0025066: Visualization - fit all is malfunction when bounding box is set through...
authorkgv <kgv@opencascade.com>
Thu, 10 Jul 2014 05:25:59 +0000 (09:25 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Jul 2014 08:12:08 +0000 (12:12 +0400)
Ensure bounding box is marked as valid.

src/Graphic3d/Graphic3d_Group.cxx

index 1c64878..bbc0022 100644 (file)
@@ -185,14 +185,14 @@ Standard_Boolean Graphic3d_Group::IsEmpty() const
 void Graphic3d_Group::SetMinMaxValues (const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin,
                                        const Standard_Real theXMax, const Standard_Real theYMax, const Standard_Real theZMax)
 {
-  myBounds.CornerMin() = Graphic3d_Vec4 (static_cast<Standard_ShortReal> (theXMin),
-                                         static_cast<Standard_ShortReal> (theYMin),
-                                         static_cast<Standard_ShortReal> (theZMin),
-                                         1.0f);
-  myBounds.CornerMax() = Graphic3d_Vec4 (static_cast<Standard_ShortReal> (theXMax),
-                                         static_cast<Standard_ShortReal> (theYMax),
-                                         static_cast<Standard_ShortReal> (theZMax),
-                                         1.0f);
+  myBounds = Graphic3d_BndBox4f (Graphic3d_Vec4 (static_cast<Standard_ShortReal> (theXMin),
+                                                 static_cast<Standard_ShortReal> (theYMin),
+                                                 static_cast<Standard_ShortReal> (theZMin),
+                                                 1.0f),
+                                 Graphic3d_Vec4 (static_cast<Standard_ShortReal> (theXMax),
+                                                 static_cast<Standard_ShortReal> (theYMax),
+                                                 static_cast<Standard_ShortReal> (theZMax),
+                                                 1.0f));
 }
 
 // =======================================================================