EBGeometry 1.0
|
Forward declare linear BVH class. More...
#include <EBGeometry_BVH.hpp>
Public Types | |
using | Vec3 = Vec3T< T > |
Alias for vector type. | |
using | LinearNode = LinearNodeT< T, P, BV, K > |
Alias for linear node type. | |
using | PrimitiveList = std::vector< std::shared_ptr< const P > > |
Alias for list of primitives. | |
Public Member Functions | |
LinearBVH ()=default | |
Disallowed. Use the full constructor please. | |
LinearBVH (const LinearBVH &)=default | |
Copy constructor. | |
LinearBVH (const std::vector< std::shared_ptr< const LinearNodeT< T, P, BV, K > > > &a_linearNodes, const std::vector< std::shared_ptr< const P > > &a_primitives) | |
Full constructor. Associates the nodes and primitives. | |
LinearBVH (const std::vector< std::shared_ptr< LinearNodeT< T, P, BV, K > > > &a_linearNodes, const std::vector< std::shared_ptr< const P > > &a_primitives) | |
Full constructor. Associates the nodes and primitives. | |
virtual | ~LinearBVH () |
Destructor. Does nothing. | |
const BV & | getBoundingVolume () const noexcept |
Get the bounding volume for this BVH. | |
template<class Meta > | |
void | traverse (const BVH::Updater< P > &a_updater, const BVH::Visiter< LinearNode, Meta > &a_visiter, const BVH::Sorter< LinearNode, Meta, K > &a_sorter, const BVH::MetaUpdater< LinearNode, Meta > &a_metaUpdater) const noexcept |
Recursion-less BVH traversal algorithm. The user inputs the update rule, a pruning criterion, and a criterion of who to visit first. | |
Protected Attributes | |
std::vector< std::shared_ptr< const LinearNodeT< T, P, BV, K > > > | m_linearNodes |
List of linearly stored nodes. | |
std::vector< std::shared_ptr< const P > > | m_primitives |
Global list of primitives. Note that this is ALL primitives, sorted so that LinearNodeT can interface into it. | |
Forward declare linear BVH class.
Linear root node for BVH hierarchy.
T is the precision used in the BVH computations, P is the enclosing primitive and BV is the bounding volume used in the BVH. K is the tree degree.
|
inline |
Full constructor. Associates the nodes and primitives.
[in] | a_linearNodes | Linearized BVH nodes. |
[in] | a_primitives | Primitives. |
|
inline |
Full constructor. Associates the nodes and primitives.
[in] | a_linearNodes | Linearized BVH nodes. |
[in] | a_primitives | Primitives. |
|
inlinenoexcept |
Recursion-less BVH traversal algorithm. The user inputs the update rule, a pruning criterion, and a criterion of who to visit first.
[in] | a_updater | Update rule (for updating whatever the user is interested in updated) |
[in] | a_visiter | Visiter rule. Must return true if we should visit the node. |
[in] | a_sorter | Children sort function for deciding which subtrees and investigated first. |
[in] | a_metaUpdater | Updater for meta-information. |