0025059: Visualization - mutable transformed structure still invalidates BVH tree...
authorkgv <kgv@opencascade.com>
Tue, 8 Jul 2014 15:23:47 +0000 (19:23 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Jul 2014 07:03:55 +0000 (11:03 +0400)
Take into account IsMutable flag within Visual3d_View::ReCompute() method.

src/Visual3d/Visual3d_View.cxx

index f33d6ea..c844753 100644 (file)
@@ -1635,12 +1635,12 @@ Standard_Integer Index = IsComputed (AStructure);
                     MyCOMPUTEDSequence.Value (Index)->GraphicTransform (ATrsf);
         }
 
-        Standard_Integer aLayerId = AStructure->GetZLayer();
+        AStructure->CalculateBoundBox();
         if (!AStructure->IsMutable()
          && !AStructure->CStructure()->IsForHighlight
          && !AStructure->CStructure()->IsInfinite)
         {
-          AStructure->CalculateBoundBox();
+          Standard_Integer aLayerId = AStructure->GetZLayer();
           MyGraphicDriver->InvalidateBVHData (MyCView, aLayerId);
         }
 }
@@ -2104,9 +2104,11 @@ Graphic3d_SequenceOfStructure FooSequence;
 }
 
 void Visual3d_View::ReCompute (const Handle(Graphic3d_Structure)& AStructure) {
-        if (MyCView.IsCullingEnabled)
+        AStructure->CalculateBoundBox();
+        if (!AStructure->IsMutable()
+         && !AStructure->CStructure()->IsForHighlight
+         && !AStructure->CStructure()->IsInfinite)
         {
-          AStructure->CalculateBoundBox();
           Standard_Integer aLayerId = AStructure->DisplayPriority();
           MyGraphicDriver->InvalidateBVHData(MyCView, aLayerId);
         }