Open CASCADE Technology  7.6.0
Public Member Functions

Graphic3d_BvhCStructureSetTrsfPers Class Reference

Set of transformation persistent OpenGl_Structure for building BVH tree. 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 <Graphic3d_BvhCStructureSetTrsfPers.hxx>

Inheritance diagram for Graphic3d_BvhCStructureSetTrsfPers:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_BvhCStructureSetTrsfPers (const Handle< Select3D_BVHBuilder3d > &theBuilder)
 Creates an empty primitive set for BVH clipping. More...
 
virtual Standard_Integer Size () const override
 Returns total number of structures. More...
 
virtual Graphic3d_BndBox3d Box (const Standard_Integer theIdx) const override
 Returns AABB of the structure. More...
 
virtual Standard_Real Center (const Standard_Integer theIdx, const Standard_Integer theAxis) const override
 Calculates center of the AABB along given axis. More...
 
virtual void Swap (const Standard_Integer theIdx1, const Standard_Integer theIdx2) override
 Swaps structures with the given indices. More...
 
Standard_Boolean Add (const Graphic3d_CStructure *theStruct)
 Adds structure to the set. More...
 
Standard_Boolean Remove (const Graphic3d_CStructure *theStruct)
 Removes the given structure from the set. More...
 
void Clear ()
 Cleans the whole primitive set. More...
 
const Graphic3d_CStructureGetStructureById (Standard_Integer theId)
 Returns the structure corresponding to the given ID. More...
 
const NCollection_IndexedMap< const Graphic3d_CStructure * > & Structures () const
 Access directly a collection of structures. More...
 
void MarkDirty ()
 Marks object state as outdated (needs BVH rebuilding). More...
 
const opencascade::handle< BVH_Tree< Standard_Real, 3 > > & BVH (const Handle< Graphic3d_Camera > &theCamera, const Graphic3d_Mat4d &theProjectionMatrix, const Graphic3d_Mat4d &theWorldViewMatrix, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, const Graphic3d_WorldViewProjState &theWVPState)
 Returns BVH tree for the given world view projection (builds it if necessary). More...
 
const Handle< Select3D_BVHBuilder3d > & Builder () const
 Returns builder for bottom-level BVH. More...
 
void SetBuilder (const Handle< Select3D_BVHBuilder3d > &theBuilder)
 Assigns builder for bottom-level BVH. More...
 
- Public Member Functions inherited from BVH_Set< Standard_Real, 3 >
 BVH_Set ()
 Creates new abstract set of objects. More...
 
virtual ~BVH_Set ()
 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

Set of transformation persistent OpenGl_Structure for building BVH tree. 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

◆ Graphic3d_BvhCStructureSetTrsfPers()

Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers ( const Handle< Select3D_BVHBuilder3d > &  theBuilder)

Creates an empty primitive set for BVH clipping.

Member Function Documentation

◆ Add()

Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Add ( const Graphic3d_CStructure theStruct)

Adds structure to the set.

Returns
true if structure added, otherwise returns false (structure already in the set).

◆ Box()

virtual Graphic3d_BndBox3d Graphic3d_BvhCStructureSetTrsfPers::Box ( const Standard_Integer  theIdx) const
overridevirtual

Returns AABB of the structure.

Implements BVH_Set< Standard_Real, 3 >.

◆ Builder()

const Handle< Select3D_BVHBuilder3d >& Graphic3d_BvhCStructureSetTrsfPers::Builder ( ) const
inline

Returns builder for bottom-level BVH.

◆ BVH()

const opencascade::handle<BVH_Tree<Standard_Real, 3> >& Graphic3d_BvhCStructureSetTrsfPers::BVH ( const Handle< Graphic3d_Camera > &  theCamera,
const Graphic3d_Mat4d theProjectionMatrix,
const Graphic3d_Mat4d theWorldViewMatrix,
const Standard_Integer  theViewportWidth,
const Standard_Integer  theViewportHeight,
const Graphic3d_WorldViewProjState theWVPState 
)

Returns BVH tree for the given world view projection (builds it if necessary).

◆ Center()

virtual Standard_Real Graphic3d_BvhCStructureSetTrsfPers::Center ( const Standard_Integer  theIdx,
const Standard_Integer  theAxis 
) const
overridevirtual

Calculates center of the AABB along given axis.

Implements BVH_Set< Standard_Real, 3 >.

◆ Clear()

void Graphic3d_BvhCStructureSetTrsfPers::Clear ( )

Cleans the whole primitive set.

◆ GetStructureById()

const Graphic3d_CStructure* Graphic3d_BvhCStructureSetTrsfPers::GetStructureById ( Standard_Integer  theId)

Returns the structure corresponding to the given ID.

◆ MarkDirty()

void Graphic3d_BvhCStructureSetTrsfPers::MarkDirty ( )
inline

Marks object state as outdated (needs BVH rebuilding).

◆ Remove()

Standard_Boolean Graphic3d_BvhCStructureSetTrsfPers::Remove ( const Graphic3d_CStructure theStruct)

Removes the given structure from the set.

Returns
true if structure removed, otherwise returns false (structure is not in the set).

◆ SetBuilder()

void Graphic3d_BvhCStructureSetTrsfPers::SetBuilder ( const Handle< Select3D_BVHBuilder3d > &  theBuilder)
inline

Assigns builder for bottom-level BVH.

◆ Size()

virtual Standard_Integer Graphic3d_BvhCStructureSetTrsfPers::Size ( ) const
overridevirtual

Returns total number of structures.

Implements BVH_Set< Standard_Real, 3 >.

◆ Structures()

const NCollection_IndexedMap<const Graphic3d_CStructure*>& Graphic3d_BvhCStructureSetTrsfPers::Structures ( ) const
inline

Access directly a collection of structures.

◆ Swap()

virtual void Graphic3d_BvhCStructureSetTrsfPers::Swap ( const Standard_Integer  theIdx1,
const Standard_Integer  theIdx2 
)
overridevirtual

Swaps structures with the given indices.

Implements BVH_Set< Standard_Real, 3 >.


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