All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends

fcl::HierarchyTree< BV > Class Template Reference

Class for hierarchy tree structure. More...

#include <hierarchy_tree.h>

List of all members.


Public Member Functions

 HierarchyTree (int bu_threshold_=16, int topdown_level_=0)
 Create hierarchy tree with suitable setting. bu_threshold decides the height of tree node to start bottom-up construction / optimization; topdown_level decides different methods to construct tree in topdown manner. lower level method constructs tree with better quality but is slower.
void init (std::vector< NodeType * > &leaves, int level=0)
 Initialize the tree by a set of leaves using algorithm with a given level.
NodeTypeinsert (const BV &bv, void *data)
 Insest a node.
void remove (NodeType *leaf)
 Remove a leaf node.
void clear ()
 Clear the tree.
bool empty () const
 Whether the tree is empty.
void update (NodeType *leaf, int lookahead_level=-1)
 update one leaf node
bool update (NodeType *leaf, const BV &bv)
 update the tree when the bounding volume of a given leaf has changed
bool update (NodeType *leaf, const BV &bv, const Vec3f &vel, FCL_REAL margin)
 update one leaf's bounding volume, with prediction
bool update (NodeType *leaf, const BV &bv, const Vec3f &vel)
 update one leaf's bounding volume, with prediction
size_t getMaxHeight () const
 get the max height of the tree
size_t getMaxDepth () const
 get the max depth of the tree
void balanceBottomup ()
 balance the tree from bottom
void balanceTopdown ()
 balance the tree from top
void balanceIncremental (int iterations)
 balance the tree in an incremental way
void refit ()
 refit the tree, i.e., when the leaf nodes' bounding volumes change, update the entire tree in a bottom-up manner
void extractLeaves (const NodeType *root, std::vector< NodeType * > &leaves) const
 extract all the leaves of the tree
size_t size () const
 number of leaves in the tree
NodeTypegetRoot () const
 get the root of the tree
NodeType *& getRoot ()
void print (NodeType *root, int depth)
 print the tree in a recursive way
template<>
bool update (NodeBase< AABB > *leaf, const AABB &bv_, const Vec3f &vel, FCL_REAL margin)
template<>
bool update (NodeBase< AABB > *leaf, const AABB &bv_, const Vec3f &vel)
template<>
bool update (NodeBase< AABB > *leaf, const AABB &bv_, const Vec3f &vel, FCL_REAL margin)
template<>
bool update (NodeBase< AABB > *leaf, const AABB &bv_, const Vec3f &vel)

Public Attributes

int topdown_level
 decide which topdown algorithm to use
int bu_threshold
 decide the depth to use expensive bottom-up algorithm

Protected Attributes

NodeTyperoot_node
size_t n_leaves
unsigned int opath
NodeTypefree_node
 This is a one NodeType cache, the reason is that we need to remove a node and then add it again frequently.
int max_lookahead_level

Classes

struct  SortByMorton

Detailed Description

template<typename BV>
class fcl::HierarchyTree< BV >

Class for hierarchy tree structure.

Definition at line 116 of file hierarchy_tree.h.


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