Template Class BVHModel
Defined in File BVH_model.h
Inheritance Relationships
Base Type
public hpp::fcl::BVHModelBase
(Class BVHModelBase)
Derived Type
public boost::serialization::internal::BVHModelAccessor< BV >
(Template Struct BVHModelAccessor)
Class Documentation
-
template<typename BV>
class BVHModel : public hpp::fcl::BVHModelBase A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh)
- Template Parameters:
BV – one of the bounding volume class in Bounding volumes.
Subclassed by boost::serialization::internal::BVHModelAccessor< BV >
Public Functions
-
BVHModel()
Default constructor to build an empty BVH.
-
BVHModel(const BVHModel &other)
Copy constructor from another BVH.
- Parameters:
other – [in] BVHModel to copy.
-
inline ~BVHModel()
deconstruction, delete mesh data related.
-
inline const BVNode<BV> &getBV(unsigned int i) const
We provide getBV() and getNumBVs() because BVH may be compressed (in future), so we must provide some flexibility here.
Access the bv giving the its index
-
inline unsigned int getNumBVs() const
Get the number of bv in the BVH.
-
virtual int memUsage(const bool msg) const
Check the number of memory used.
-
inline virtual void makeParentRelative()
This is a special acceleration: BVH_model default stores the BV’s transform in world coordinate. However, we can also store each BV’s transform related to its parent BV node. When traversing the BVH, this can save one matrix transformation.
-
virtual NODE_TYPE getNodeType() const
Specialization of getNodeType() for BVHModel with different BV types.
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
-
virtual NODE_TYPE getNodeType() const
get the node type
Public Members
-
shared_ptr<BVSplitter<BV>> bv_splitter
Split rule to split one BV node into two children.
Protected Functions
-
virtual void deleteBVs()
-
virtual bool allocateBVs()
-
virtual int buildTree()
Build the bounding volume hierarchy.
-
virtual int refitTree(bool bottomup)
Refit the bounding volume hierarchy.
-
int refitTree_topdown()
Refit the bounding volume hierarchy in a top-down way (slow but more compact)
-
int refitTree_bottomup()
Refit the bounding volume hierarchy in a bottom-up way (fast but less compact)
-
int recursiveBuildTree(int bv_id, unsigned int first_primitive, unsigned int num_primitives)
Recursive kernel for hierarchy construction.
-
int recursiveRefitTree_bottomup(int bv_id)
Recursive kernel for bottomup refitting.