![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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>

Public Member Functions | |
| Graphic3d_BvhCStructureSetTrsfPers (const occ::handle< BVH_Builder3d > &theBuilder) | |
| Creates an empty primitive set for BVH clipping. | |
| int | Size () const override |
| Returns total number of structures. | |
| Graphic3d_BndBox3d | Box (const int theIdx) const override |
| Returns AABB of the structure. | |
| double | Center (const int theIdx, const int theAxis) const override |
| Calculates center of the AABB along given axis. | |
| void | Swap (const int theIdx1, const int theIdx2) override |
| Swaps structures with the given indices. | |
| bool | Add (const Graphic3d_CStructure *theStruct) |
| Adds structure to the set. | |
| bool | Remove (const Graphic3d_CStructure *theStruct) |
| Removes the given structure from the set. | |
| void | Clear () |
| Cleans the whole primitive set. | |
| const Graphic3d_CStructure * | GetStructureById (int theId) |
| Returns the structure corresponding to the given ID. | |
| const NCollection_IndexedMap< const Graphic3d_CStructure * > & | Structures () const |
| Access directly a collection of structures. | |
| void | MarkDirty () |
| Marks object state as outdated (needs BVH rebuilding). | |
| const opencascade::handle< BVH_Tree< double, 3 > > & | BVH (const occ::handle< Graphic3d_Camera > &theCamera, const NCollection_Mat4< double > &theProjectionMatrix, const NCollection_Mat4< double > &theWorldViewMatrix, const int theViewportWidth, const int theViewportHeight, const Graphic3d_WorldViewProjState &theWVPState) |
| Returns BVH tree for the given world view projection (builds it if necessary). | |
| const occ::handle< BVH_Builder3d > & | Builder () const |
| Returns builder for bottom-level BVH. | |
| void | SetBuilder (const occ::handle< BVH_Builder3d > &theBuilder) |
| Assigns builder for bottom-level BVH. | |
Public Member Functions inherited from BVH_Set< double, 3 > | |
| BVH_Set ()=default | |
| Creates new abstract set of objects. | |
| virtual | ~BVH_Set ()=default |
| Releases resources of set of objects. | |
| virtual BVH_Box< double, N > | Box () const |
| Returns AABB of the entire set of objects. | |
Additional Inherited Members | |
Public Types inherited from BVH_Set< double, 3 > | |
| typedef BVH_Box< double, 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).
| Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers | ( | const occ::handle< BVH_Builder3d > & | theBuilder | ) |
Creates an empty primitive set for BVH clipping.
| bool Graphic3d_BvhCStructureSetTrsfPers::Add | ( | const Graphic3d_CStructure * | theStruct | ) |
Adds structure to the set.
|
overridevirtual |
Returns AABB of the structure.
Implements BVH_Set< double, 3 >.
|
inline |
Returns builder for bottom-level BVH.
| const opencascade::handle< BVH_Tree< double, 3 > > & Graphic3d_BvhCStructureSetTrsfPers::BVH | ( | const occ::handle< Graphic3d_Camera > & | theCamera, |
| const NCollection_Mat4< double > & | theProjectionMatrix, | ||
| const NCollection_Mat4< double > & | theWorldViewMatrix, | ||
| const int | theViewportWidth, | ||
| const int | 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< double, 3 >.
| void Graphic3d_BvhCStructureSetTrsfPers::Clear | ( | ) |
Cleans the whole primitive set.
| const Graphic3d_CStructure * Graphic3d_BvhCStructureSetTrsfPers::GetStructureById | ( | int | theId | ) |
Returns the structure corresponding to the given ID.
|
inline |
Marks object state as outdated (needs BVH rebuilding).
| bool Graphic3d_BvhCStructureSetTrsfPers::Remove | ( | const Graphic3d_CStructure * | theStruct | ) |
Removes the given structure from the set.
|
inline |
Assigns builder for bottom-level BVH.
|
overridevirtual |
Returns total number of structures.
Implements BVH_Set< double, 3 >.
|
inline |
Access directly a collection of structures.
|
overridevirtual |
Swaps structures with the given indices.
Implements BVH_Set< double, 3 >.