Open CASCADE Technology  7.0.0
Public Member Functions

SelectMgr_SelectableObjectTrsfPersSet Class Reference

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>

Inheritance diagram for SelectMgr_SelectableObjectTrsfPersSet:
Inheritance graph
[legend]

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...
 
- Public Member Functions inherited from BVH_Set< Standard_Real, 3 >
 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

- Public Types inherited from BVH_Set< Standard_Real, 3 >
typedef BVH_Box< Standard_Real, N > BVH_BoxNt
 

Detailed Description

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).

Constructor & Destructor Documentation

SelectMgr_SelectableObjectTrsfPersSet::SelectMgr_SelectableObjectTrsfPersSet ( )

Creates new empty objects set and initializes BVH tree builder to Linear builder with 1 element per list.

Member Function Documentation

Standard_Boolean SelectMgr_SelectableObjectTrsfPersSet::Append ( const Handle< SelectMgr_SelectableObject > &  theObject)

Adds new selectable object to the set.

Returns
true if structure added, otherwise returns false (structure already in the set).
virtual Select3D_BndBox3d SelectMgr_SelectableObjectTrsfPersSet::Box ( const Standard_Integer  theIndex) const
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).

virtual Standard_Real SelectMgr_SelectableObjectTrsfPersSet::Center ( const Standard_Integer  theIndex,
const Standard_Integer  theAxis 
) const
overridevirtual

Returns center of object with index theIndex in the set along the given axis theAxis.

Implements BVH_Set< Standard_Real, 3 >.

Standard_Boolean SelectMgr_SelectableObjectTrsfPersSet::Contains ( const Handle< SelectMgr_SelectableObject > &  theObject) const
inline

Returns true if this objects set contains theObject given.

const Handle< SelectMgr_SelectableObject >& SelectMgr_SelectableObjectTrsfPersSet::GetObjectById ( const Standard_Integer  theIndex) const
inline

Returns object from set by theIndex given.

void SelectMgr_SelectableObjectTrsfPersSet::MarkDirty ( )
inline

Marks object state as outdated (needs BVH rebuilding).

Standard_Boolean SelectMgr_SelectableObjectTrsfPersSet::Remove ( const Handle< SelectMgr_SelectableObject > &  theObject)

Removes selectable object from set.

Returns
true if structure removed, otherwise returns false (structure is not in the set).
virtual Standard_Integer SelectMgr_SelectableObjectTrsfPersSet::Size ( ) const
overridevirtual

Returns size of objects set.

Implements BVH_Set< Standard_Real, 3 >.

virtual void SelectMgr_SelectableObjectTrsfPersSet::Swap ( const Standard_Integer  theIndex1,
const Standard_Integer  theIndex2 
)
overridevirtual

Swaps items with indexes theIndex1 and theIndex2 in the set.

Implements BVH_Set< Standard_Real, 3 >.


The documentation for this class was generated from the following file: