mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0031976: Foundation Classes, BVH_IndexedBoxSet - access members of base class via this pointer
This commit is contained in:
parent
75cf82505b
commit
1aa38057ef
@ -84,7 +84,7 @@ public: //! @name Necessary overrides for BVH construction
|
|||||||
//! Returns the bounding box with the given index.
|
//! Returns the bounding box with the given index.
|
||||||
virtual BVH_Box <NumType, Dimension> Box (const Standard_Integer theIndex) const Standard_OVERRIDE
|
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.
|
//! Swaps indices of two specified boxes.
|
||||||
@ -95,9 +95,9 @@ public: //! @name Necessary overrides for BVH construction
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! Returns the Element with the index theIndex.
|
//! 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
|
protected: //! @name Fields
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <BVH_BoxSet.hxx>
|
#include <BVH_BoxSet.hxx>
|
||||||
#include <BVH_DistanceField.hxx>
|
#include <BVH_DistanceField.hxx>
|
||||||
#include <BVH_Geometry.hxx>
|
#include <BVH_Geometry.hxx>
|
||||||
|
#include <BVH_IndexedBoxSet.hxx>
|
||||||
#include <BVH_LinearBuilder.hxx>
|
#include <BVH_LinearBuilder.hxx>
|
||||||
#include <BVH_PairDistance.hxx>
|
#include <BVH_PairDistance.hxx>
|
||||||
#include <BVH_Traverse.hxx>
|
#include <BVH_Traverse.hxx>
|
||||||
@ -207,8 +208,9 @@ static Standard_Integer QABVH_ShapeSelect (Draw_Interpretor& theDI,
|
|||||||
new BVH_LinearBuilder <Standard_Real, 3>();
|
new BVH_LinearBuilder <Standard_Real, 3>();
|
||||||
|
|
||||||
// Create the ShapeSet
|
// Create the ShapeSet
|
||||||
opencascade::handle <BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> > aShapeBoxSet =
|
opencascade::handle <BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> > aShapeBoxSet = !useVoidSelector ?
|
||||||
new BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder);
|
new BVH_BoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder) :
|
||||||
|
new BVH_IndexedBoxSet <Standard_Real, 3, TopoDS_Shape> (aLBuilder);
|
||||||
|
|
||||||
// Add elements into BVH
|
// Add elements into BVH
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user