Open CASCADE Technology  6.9.1
Public Member Functions | Protected Member Functions | Protected Attributes
BVH_PrimitiveSet< T, N > Class Template Reference

Set of abstract geometric primitives organized with bounding volume hierarchy (BVH). Unlike an object set, this collection is designed for storing structural elements of a single object (such as triangles in the object triangulation). Because there may be a large number of such elements, the implementations of this interface should be sufficiently optimized. More...

#include <BVH_PrimitiveSet.hxx>

Inheritance diagram for BVH_PrimitiveSet< T, N >:
Inheritance graph
[legend]

Public Member Functions

 BVH_PrimitiveSet ()
 Creates set of abstract primitives. More...
 
virtual ~BVH_PrimitiveSet ()
 Releases resources of set of abstract primitives. More...
 
virtual BVH_Box< T, N > Box () const
 Returns AABB of primitive set. More...
 
virtual const NCollection_Handle< BVH_Tree< T, N > > & BVH ()
 Returns BVH tree (and builds it if necessary). More...
 
virtual const NCollection_Handle< BVH_Builder< T, N > > & Builder () const
 Returns the method (builder) used to construct BVH. More...
 
virtual void SetBuilder (NCollection_Handle< BVH_Builder< T, N > > &theBuilder)
 Sets the method (builder) used to construct BVH. More...
 
- Public Member Functions inherited from BVH_Object< T, N >
 BVH_Object ()
 Creates new abstract geometric object. More...
 
virtual ~BVH_Object ()=0
 Releases resources of geometric object. More...
 
virtual const NCollection_Handle< BVH_Properties > & Properties () const
 Returns properties of the geometric object. More...
 
virtual void SetProperties (const NCollection_Handle< BVH_Properties > &theProperties)
 Sets properties of the geometric object. More...
 
virtual void MarkDirty ()
 Marks object state as outdated (needs BVH rebuilding). More...
 
- Public Member Functions inherited from BVH_Set< T, N >
 BVH_Set ()
 Creates new abstract set of objects. More...
 
virtual ~BVH_Set ()=0
 Releases resources of set of objects. More...
 
virtual Standard_Integer Size () const =0
 Returns total number of objects. More...
 
virtual BVH_Box< T, N > Box (const Standard_Integer theIndex) const =0
 Returns AABB of the given object. More...
 
virtual T Center (const Standard_Integer theIndex, const Standard_Integer theAxis) const =0
 Returns centroid position along the given axis. More...
 
virtual void Swap (const Standard_Integer theIndex1, const Standard_Integer theIndex2)=0
 Performs transposing the two given objects in the set. More...
 

Protected Member Functions

virtual void Update ()
 Updates BVH of primitive set. More...
 

Protected Attributes

NCollection_Handle< BVH_Tree< T, N > > myBVH
 Constructed bottom-level BVH. More...
 
NCollection_Handle< BVH_Builder< T, N > > myBuilder
 Builder for bottom-level BVH. More...
 
BVH_Box< T, N > myBox
 Cached bounding box of geometric primitives. More...
 
- Protected Attributes inherited from BVH_Object< T, N >
Standard_Boolean myIsDirty
 Marks internal object state as outdated. More...
 
NCollection_Handle< BVH_PropertiesmyProperties
 Generic properties assigned to the object. More...
 

Additional Inherited Members

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

Detailed Description

template<class T, int N>
class BVH_PrimitiveSet< T, N >

Set of abstract geometric primitives organized with bounding volume hierarchy (BVH). Unlike an object set, this collection is designed for storing structural elements of a single object (such as triangles in the object triangulation). Because there may be a large number of such elements, the implementations of this interface should be sufficiently optimized.

Template Parameters
TNumeric data type
NVector dimension

Constructor & Destructor Documentation

template<class T, int N>
BVH_PrimitiveSet< T, N >::BVH_PrimitiveSet ( )

Creates set of abstract primitives.

template<class T, int N>
virtual BVH_PrimitiveSet< T, N >::~BVH_PrimitiveSet ( )
virtual

Releases resources of set of abstract primitives.

Member Function Documentation

template<class T, int N>
virtual BVH_Box<T, N> BVH_PrimitiveSet< T, N >::Box ( ) const
virtual

Returns AABB of primitive set.

Implements BVH_Object< T, N >.

Reimplemented in OpenGl_TriangleSet.

template<class T, int N>
virtual const NCollection_Handle<BVH_Builder<T, N> >& BVH_PrimitiveSet< T, N >::Builder ( ) const
virtual

Returns the method (builder) used to construct BVH.

template<class T, int N>
virtual const NCollection_Handle<BVH_Tree<T, N> >& BVH_PrimitiveSet< T, N >::BVH ( )
virtual

Returns BVH tree (and builds it if necessary).

template<class T, int N>
virtual void BVH_PrimitiveSet< T, N >::SetBuilder ( NCollection_Handle< BVH_Builder< T, N > > &  theBuilder)
virtual

Sets the method (builder) used to construct BVH.

template<class T, int N>
virtual void BVH_PrimitiveSet< T, N >::Update ( )
protectedvirtual

Updates BVH of primitive set.

Field Documentation

template<class T, int N>
BVH_Box<T, N> BVH_PrimitiveSet< T, N >::myBox
mutableprotected

Cached bounding box of geometric primitives.

template<class T, int N>
NCollection_Handle<BVH_Builder<T, N> > BVH_PrimitiveSet< T, N >::myBuilder
protected

Builder for bottom-level BVH.

template<class T, int N>
NCollection_Handle<BVH_Tree<T, N> > BVH_PrimitiveSet< T, N >::myBVH
protected

Constructed bottom-level BVH.


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