]> OCCT Git - occt.git/commitdiff
0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via...
authoremv <emv@opencascade.com>
Fri, 4 Dec 2020 05:52:23 +0000 (08:52 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 4 Dec 2020 16:00:12 +0000 (19:00 +0300)
src/BVH/BVH_IndexedBoxSet.hxx
src/QABugs/QABugs_BVH.cxx

index dd822adce052cc87746b56caec618c6417d8edde..e62020d2226d0c16c66821bc8e9ab82ec342509d 100644 (file)
@@ -84,7 +84,7 @@ public: //! @name Necessary overrides for BVH construction
   //! Returns the bounding box with the given index.
   virtual BVH_Box <NumType, Dimension> Box (const Standard_Integer theIndex) const Standard_OVERRIDE
   {
-    return myBoxes[myIndices[theIndex]];
+    return this->myBoxes[myIndices[theIndex]];
   }
 
   //! Swaps indices of two specified boxes.
@@ -95,9 +95,9 @@ public: //! @name Necessary overrides for BVH construction
   }
 
   //! Returns the Element with the index theIndex.
-  virtual DataType Element (const Standard_Integer theIndex) const
+  virtual DataType Element (const Standard_Integer theIndex) const Standard_OVERRIDE
   {
-    return myElements[myIndices[theIndex]];
+    return this->myElements[myIndices[theIndex]];
   }
 
 protected: //! @name Fields
index a2c96aadaf96cca3cce2a57d025ae051ff203bd7..158dde846549a9859ca1cb6052ec47ae78978644 100644 (file)
@@ -26,6 +26,7 @@
 #include <BVH_BoxSet.hxx>
 #include <BVH_DistanceField.hxx>
 #include <BVH_Geometry.hxx>
+#include <BVH_IndexedBoxSet.hxx>
 #include <BVH_LinearBuilder.hxx>
 #include <BVH_PairDistance.hxx>
 #include <BVH_Traverse.hxx>
@@ -207,8 +208,9 @@ static Standard_Integer QABVH_ShapeSelect (Draw_Interpretor& theDI,
       new BVH_LinearBuilder <Standard_Real, 3>();
 
   // Create the ShapeSet
-  opencascade::handle <BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> > aShapeBoxSet =
-    new BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder);
+  opencascade::handle <BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> > aShapeBoxSet = !useVoidSelector ?
+    new BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder) :
+    new BVH_IndexedBoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder);
 
   // Add elements into BVH