Open CASCADE Technology
7.1.0.beta
|
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>
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... | |
![]() | |
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 Types | |
typedef NCollection_Array1< BVH_EncodedLink >::iterator | LinkIterator |
Protected Member Functions | |
Standard_Integer | EmitHierachy (BVH_Tree< T, N > *theBVH, const Standard_Integer theBit, const Standard_Integer theShift, const Standard_Integer theStart, const Standard_Integer theFinal) |
Emits hierarchy from sorted Morton codes. More... | |
Standard_Integer | LowerBound (Standard_Integer theStart, Standard_Integer theFinal, Standard_Integer theDigit) |
Returns index of the first element which does not compare less than the given one. More... | |
![]() | |
void | UpdateDepth (BVH_Tree< T, N > *theBVH, const Standard_Integer theLevel) |
Updates depth of constructed BVH tree. More... | |
Protected Attributes | |
NCollection_Handle< BVH_RadixSorter< T, N > > | myRadixSorter |
Tool object to perform radix sort of BVH primitives. More... | |
![]() | |
Standard_Integer | myMaxTreeDepth |
Maximum depth of constructed BVH. More... | |
Standard_Integer | myLeafNodeSize |
Maximum number of objects per leaf. More... | |
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.
typedef BVH::VectorType<T, N>::Type BVH_LinearBuilder< T, N >::BVH_VecNt |
|
protected |
BVH_LinearBuilder< T, N >::BVH_LinearBuilder | ( | const Standard_Integer | theLeafNodeSize = 5 , |
const Standard_Integer | theMaxTreeDepth = 32 |
||
) |
Creates binned LBVH builder.
|
virtual |
Releases resources of LBVH builder.
|
virtual |
Builds BVH.
Implements BVH_Builder< T, N >.
|
protected |
Emits hierarchy from sorted Morton codes.
|
protected |
Returns index of the first element which does not compare less than the given one.
|
protected |
Tool object to perform radix sort of BVH primitives.