Open CASCADE Technology  6.9.0
Public Types | Public Member Functions | Protected Member Functions

BVH_LinearBuilder< T, N > Class Template Reference

Performs fast BVH construction using LBVH building approach. Algorithm uses spatial Morton codes to reduce the BVH construction problem to a sorting problem (radix sort – O(N) complexity). This Linear Bounding Volume Hierarchy (LBVH) builder produces BVH trees of lower quality compared to SAH-based BVH builders but it is over an order of magnitude faster (up to 3M triangles per second). More...

#include <BVH_LinearBuilder.hxx>

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

Public Types

typedef BVH::VectorType< T, N >
::Type 
BVH_VecNt
 

Public Member Functions

 BVH_LinearBuilder (const Standard_Integer theLeafNodeSize=5, const Standard_Integer theMaxTreeDepth=32)
 Creates binned LBVH builder. More...
 
virtual ~BVH_LinearBuilder ()
 Releases resources of LBVH builder. More...
 
void Build (BVH_Set< T, N > *theSet, BVH_Tree< T, N > *theBVH, const BVH_Box< T, N > &theBox)
 Builds BVH. More...
 
- Public Member Functions inherited from BVH_Builder< T, N >
 BVH_Builder (const Standard_Integer theLeafNodeSize, const Standard_Integer theMaxTreeDepth)
 Creates new abstract BVH builder. More...
 
virtual ~BVH_Builder ()
 Releases resources of BVH builder. More...
 

Protected Member Functions

Standard_Integer EmitHierachy (BVH_Tree< T, N > *theBVH, const Standard_Integer theBit, const Standard_Integer theShift, std::vector< BVH_EncodedLink >::iterator theStart, std::vector< BVH_EncodedLink >::iterator theFinal)
 Emits hierarchy from sorted Morton codes. More...
 
- Protected Member Functions inherited from BVH_Builder< T, N >
void UpdateDepth (BVH_Tree< T, N > *theBVH, const Standard_Integer theLevel)
 Updates depth of constructed BVH tree. More...
 

Additional Inherited Members

- Protected Attributes inherited from BVH_Builder< T, N >
Standard_Integer myMaxTreeDepth
 Maximum depth of constructed BVH. More...
 
Standard_Integer myLeafNodeSize
 Maximum number of objects per leaf. More...
 

Detailed Description

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

Performs fast BVH construction using LBVH building approach. Algorithm uses spatial Morton codes to reduce the BVH construction problem to a sorting problem (radix sort – O(N) complexity). This Linear Bounding Volume Hierarchy (LBVH) builder produces BVH trees of lower quality compared to SAH-based BVH builders but it is over an order of magnitude faster (up to 3M triangles per second).

For more details see: C. Lauterbach, M. Garland, S. Sengupta, D. Luebke, and D. Manocha. Fast BVH construction on GPUs. Eurographics, 2009.

Member Typedef Documentation

template<class T , int N>
typedef BVH::VectorType<T, N>::Type BVH_LinearBuilder< T, N >::BVH_VecNt

Constructor & Destructor Documentation

template<class T , int N>
BVH_LinearBuilder< T, N >::BVH_LinearBuilder ( const Standard_Integer  theLeafNodeSize = 5,
const Standard_Integer  theMaxTreeDepth = 32 
)

Creates binned LBVH builder.

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

Releases resources of LBVH builder.

Member Function Documentation

template<class T , int N>
void BVH_LinearBuilder< T, N >::Build ( BVH_Set< T, N > *  theSet,
BVH_Tree< T, N > *  theBVH,
const BVH_Box< T, N > &  theBox 
)
virtual

Builds BVH.

Implements BVH_Builder< T, N >.

template<class T , int N>
Standard_Integer BVH_LinearBuilder< T, N >::EmitHierachy ( BVH_Tree< T, N > *  theBVH,
const Standard_Integer  theBit,
const Standard_Integer  theShift,
std::vector< BVH_EncodedLink >::iterator  theStart,
std::vector< BVH_EncodedLink >::iterator  theFinal 
)
protected

Emits hierarchy from sorted Morton codes.


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