hpp-fcl 2.4.5
HPP fork of FCL -- The Flexible Collision Library
Loading...
Searching...
No Matches
hpp::fcl::detail::implementation_array::HierarchyTree< BV > Class Template Reference

Class for hierarchy tree structure. More...

#include <hpp/fcl/broadphase/detail/hierarchy_tree_array.h>

Collaboration diagram for hpp::fcl::detail::implementation_array::HierarchyTree< BV >:

Public Types

typedef NodeBase< BV > Node
 

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.
 
 ~HierarchyTree ()
 
void init (Node *leaves, int n_leaves_, int level=0)
 Initialize the tree by a set of leaves using algorithm with a given level.
 
size_t insert (const BV &bv, void *data)
 Initialize the tree by a set of leaves using algorithm with a given level.
 
void remove (size_t leaf)
 Remove a leaf node.
 
void clear ()
 Clear the tree.
 
bool empty () const
 Whether the tree is empty.
 
void update (size_t leaf, int lookahead_level=-1)
 update one leaf node
 
bool update (size_t leaf, const BV &bv)
 update the tree when the bounding volume of a given leaf has changed
 
bool update (size_t leaf, const BV &bv, const Vec3f &vel, FCL_REAL margin)
 update one leaf's bounding volume, with prediction
 
bool update (size_t 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 (size_t root, Node *&leaves) const
 extract all the leaves of the tree
 
size_t size () const
 number of leaves in the tree
 
size_t getRoot () const
 get the root of the tree
 
NodegetNodes () const
 get the pointer to the nodes array
 
void print (size_t root, int depth)
 print the tree in a recursive way
 

Public Attributes

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

Static Public Attributes

static const size_t NULL_NODE = std::numeric_limits<size_t>::max()
 

Protected Attributes

size_t root_node
 
Nodenodes
 
size_t n_nodes
 
size_t n_nodes_alloc
 
size_t n_leaves
 
size_t freelist
 
unsigned int opath
 
int max_lookahead_level
 

Detailed Description

template<typename BV>
class hpp::fcl::detail::implementation_array::HierarchyTree< BV >

Class for hierarchy tree structure.

Member Typedef Documentation

◆ Node

template<typename BV >
typedef NodeBase<BV> hpp::fcl::detail::implementation_array::HierarchyTree< BV >::Node

Constructor & Destructor Documentation

◆ HierarchyTree()

template<typename BV >
hpp::fcl::detail::implementation_array::HierarchyTree< BV >::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.

◆ ~HierarchyTree()

Member Function Documentation

◆ balanceBottomup()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::balanceBottomup ( )

balance the tree from bottom

◆ balanceIncremental()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::balanceIncremental ( int iterations)

balance the tree in an incremental way

◆ balanceTopdown()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::balanceTopdown ( )

balance the tree from top

◆ clear()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::clear ( )

Clear the tree.

◆ empty()

template<typename BV >
bool hpp::fcl::detail::implementation_array::HierarchyTree< BV >::empty ( ) const

Whether the tree is empty.

◆ extractLeaves()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::extractLeaves ( size_t root,
Node *& leaves ) const

extract all the leaves of the tree

◆ getMaxDepth()

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::getMaxDepth ( ) const

get the max depth of the tree

◆ getMaxHeight()

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::getMaxHeight ( ) const

get the max height of the tree

◆ getNodes()

template<typename BV >
HierarchyTree< BV >::Node * hpp::fcl::detail::implementation_array::HierarchyTree< BV >::getNodes ( ) const

get the pointer to the nodes array

◆ getRoot()

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::getRoot ( ) const

get the root of the tree

◆ init()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::init ( Node * leaves,
int n_leaves_,
int level = 0 )

Initialize the tree by a set of leaves using algorithm with a given level.

◆ insert()

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::insert ( const BV & bv,
void * data )

Initialize the tree by a set of leaves using algorithm with a given level.

◆ print()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::print ( size_t root,
int depth )

print the tree in a recursive way

◆ refit()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::refit ( )

refit the tree, i.e., when the leaf nodes' bounding volumes change, update the entire tree in a bottom-up manner

◆ remove()

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::remove ( size_t leaf)

Remove a leaf node.

◆ size()

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::size ( ) const

number of leaves in the tree

◆ update() [1/4]

template<typename BV >
bool hpp::fcl::detail::implementation_array::HierarchyTree< BV >::update ( size_t leaf,
const BV & bv )

update the tree when the bounding volume of a given leaf has changed

◆ update() [2/4]

template<typename BV >
bool hpp::fcl::detail::implementation_array::HierarchyTree< BV >::update ( size_t leaf,
const BV & bv,
const Vec3f & vel )

update one leaf's bounding volume, with prediction

◆ update() [3/4]

template<typename BV >
bool hpp::fcl::detail::implementation_array::HierarchyTree< BV >::update ( size_t leaf,
const BV & bv,
const Vec3f & vel,
FCL_REAL margin )

update one leaf's bounding volume, with prediction

◆ update() [4/4]

template<typename BV >
void hpp::fcl::detail::implementation_array::HierarchyTree< BV >::update ( size_t leaf,
int lookahead_level = -1 )

update one leaf node

Member Data Documentation

◆ bu_threshold

template<typename BV >
int hpp::fcl::detail::implementation_array::HierarchyTree< BV >::bu_threshold

decide the depth to use expensive bottom-up algorithm

◆ freelist

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::freelist
protected

◆ max_lookahead_level

template<typename BV >
int hpp::fcl::detail::implementation_array::HierarchyTree< BV >::max_lookahead_level
protected

◆ n_leaves

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::n_leaves
protected

◆ n_nodes

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::n_nodes
protected

◆ n_nodes_alloc

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::n_nodes_alloc
protected

◆ nodes

template<typename BV >
Node* hpp::fcl::detail::implementation_array::HierarchyTree< BV >::nodes
protected

◆ NULL_NODE

template<typename BV >
const size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::NULL_NODE = std::numeric_limits<size_t>::max()
static

◆ opath

template<typename BV >
unsigned int hpp::fcl::detail::implementation_array::HierarchyTree< BV >::opath
protected

◆ root_node

template<typename BV >
size_t hpp::fcl::detail::implementation_array::HierarchyTree< BV >::root_node
protected

◆ topdown_level

template<typename BV >
int hpp::fcl::detail::implementation_array::HierarchyTree< BV >::topdown_level

decide which topdown algorithm to use


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