Open CASCADE Technology
7.1.0.beta
|
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 <OpenGl_BVHClipPrimitiveTrsfPersSet.hxx>
Public Member Functions | |
OpenGl_BVHClipPrimitiveTrsfPersSet () | |
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 OpenGl_Structure *theStruct) |
Adds structure to the set. More... | |
Standard_Boolean | Remove (const OpenGl_Structure *theStruct) |
Removes the given structure from the set. More... | |
void | Clear () |
Cleans the whole primitive set. More... | |
const OpenGl_Structure * | GetStructureById (Standard_Integer theId) |
Returns the structure corresponding to the given ID. More... | |
void | MarkDirty () |
Marks object state as outdated (needs BVH rebuilding). More... | |
const NCollection_Handle< BVH_Tree< Standard_Real, 3 > > & | BVH (const Handle< Graphic3d_Camera > &theCamera, const OpenGl_Mat4d &theProjectionMatrix, const OpenGl_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... | |
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 |
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).
OpenGl_BVHClipPrimitiveTrsfPersSet::OpenGl_BVHClipPrimitiveTrsfPersSet | ( | ) |
Creates an empty primitive set for BVH clipping.
Standard_Boolean OpenGl_BVHClipPrimitiveTrsfPersSet::Add | ( | const OpenGl_Structure * | theStruct | ) |
Adds structure to the set.
|
overridevirtual |
Returns AABB of the structure.
Implements BVH_Set< Standard_Real, 3 >.
const NCollection_Handle<BVH_Tree<Standard_Real, 3> >& OpenGl_BVHClipPrimitiveTrsfPersSet::BVH | ( | const Handle< Graphic3d_Camera > & | theCamera, |
const OpenGl_Mat4d & | theProjectionMatrix, | ||
const OpenGl_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).
|
overridevirtual |
Calculates center of the AABB along given axis.
Implements BVH_Set< Standard_Real, 3 >.
void OpenGl_BVHClipPrimitiveTrsfPersSet::Clear | ( | ) |
Cleans the whole primitive set.
const OpenGl_Structure* OpenGl_BVHClipPrimitiveTrsfPersSet::GetStructureById | ( | Standard_Integer | theId | ) |
Returns the structure corresponding to the given ID.
|
inline |
Marks object state as outdated (needs BVH rebuilding).
Standard_Boolean OpenGl_BVHClipPrimitiveTrsfPersSet::Remove | ( | const OpenGl_Structure * | theStruct | ) |
Removes the given structure from the set.
|
overridevirtual |
Returns total number of structures.
Implements BVH_Set< Standard_Real, 3 >.
|
overridevirtual |
Swaps structures with the given indices.
Implements BVH_Set< Standard_Real, 3 >.