Open CASCADE Technology
7.0.0
|
Primitive set specialized for transformation persistent selectable objects. Provides built-in mechanism to invalidate tree when world view projection state changes. Due to frequent invalidation of BVH tree the choice of BVH tree builder is made in favor of BVH linear builder (quick rebuild). More...
#include <SelectMgr_SelectableObjectTrsfPersSet.hxx>
Public Member Functions | |
SelectMgr_SelectableObjectTrsfPersSet () | |
Creates new empty objects set and initializes BVH tree builder to Linear builder with 1 element per list. More... | |
virtual Standard_Integer | Size () const override |
Returns size of objects set. More... | |
virtual Select3D_BndBox3d | Box (const Standard_Integer theIndex) const override |
Returns bounding box of object with index theIndex. More... | |
virtual Standard_Real | Center (const Standard_Integer theIndex, const Standard_Integer theAxis) const override |
Returns center of object with index theIndex in the set along the given axis theAxis. More... | |
virtual void | Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2) override |
Swaps items with indexes theIndex1 and theIndex2 in the set. More... | |
Standard_Boolean | Append (const Handle< SelectMgr_SelectableObject > &theObject) |
Adds new selectable object to the set. More... | |
Standard_Boolean | Remove (const Handle< SelectMgr_SelectableObject > &theObject) |
Removes selectable object from set. More... | |
const Handle< SelectMgr_SelectableObject > & | GetObjectById (const Standard_Integer theIndex) const |
Returns object from set by theIndex given. More... | |
void | MarkDirty () |
Marks object state as outdated (needs BVH rebuilding). More... | |
Standard_Boolean | Contains (const Handle< SelectMgr_SelectableObject > &theObject) const |
Returns true if this objects set contains theObject given. More... | |
const NCollection_Handle< BVH_Tree< Standard_Real, 3 > > & | BVH (const Graphic3d_Mat4d &theProjectionMatrix, const Graphic3d_Mat4d &theWorldViewMatrix, const Graphic3d_WorldViewProjState &theWVPState) |
Returns BVH tree for the given world view projection (builds it if necessary). More... | |
![]() | |
BVH_Set () | |
Creates new abstract set of objects. More... | |
virtual | ~BVH_Set ()=0 |
Releases resources of set of objects. More... | |
virtual BVH_Box< Standard_Real, N > | Box () const |
Returns AABB of the entire set of objects. More... | |
Additional Inherited Members | |
![]() | |
typedef BVH_Box< Standard_Real, N > | BVH_BoxNt |
Primitive set specialized for transformation persistent selectable objects. Provides built-in mechanism to invalidate tree when world view projection state changes. Due to frequent invalidation of BVH tree the choice of BVH tree builder is made in favor of BVH linear builder (quick rebuild).
SelectMgr_SelectableObjectTrsfPersSet::SelectMgr_SelectableObjectTrsfPersSet | ( | ) |
Creates new empty objects set and initializes BVH tree builder to Linear builder with 1 element per list.
Standard_Boolean SelectMgr_SelectableObjectTrsfPersSet::Append | ( | const Handle< SelectMgr_SelectableObject > & | theObject | ) |
Adds new selectable object to the set.
|
overridevirtual |
Returns bounding box of object with index theIndex.
Implements BVH_Set< Standard_Real, 3 >.
const NCollection_Handle<BVH_Tree<Standard_Real, 3> >& SelectMgr_SelectableObjectTrsfPersSet::BVH | ( | const Graphic3d_Mat4d & | theProjectionMatrix, |
const Graphic3d_Mat4d & | theWorldViewMatrix, | ||
const Graphic3d_WorldViewProjState & | theWVPState | ||
) |
Returns BVH tree for the given world view projection (builds it if necessary).
|
overridevirtual |
Returns center of object with index theIndex in the set along the given axis theAxis.
Implements BVH_Set< Standard_Real, 3 >.
|
inline |
Returns true if this objects set contains theObject given.
|
inline |
Returns object from set by theIndex given.
|
inline |
Marks object state as outdated (needs BVH rebuilding).
Standard_Boolean SelectMgr_SelectableObjectTrsfPersSet::Remove | ( | const Handle< SelectMgr_SelectableObject > & | theObject | ) |
Removes selectable object from set.
|
overridevirtual |
Returns size of objects set.
Implements BVH_Set< Standard_Real, 3 >.
|
overridevirtual |
Swaps items with indexes theIndex1 and theIndex2 in the set.
Implements BVH_Set< Standard_Real, 3 >.