coal
3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
|
Interval tree. More...
#include <coal/broadphase/detail/interval_tree.h>
Public Member Functions | |
IntervalTree () | |
~IntervalTree () | |
void | print () const |
Print the whole interval tree. More... | |
SimpleInterval * | deleteNode (IntervalTreeNode *node) |
Delete one node of the interval tree. More... | |
void | deleteNode (SimpleInterval *ivl) |
delete node stored a given interval More... | |
IntervalTreeNode * | insert (SimpleInterval *new_interval) |
Insert one node of the interval tree. More... | |
IntervalTreeNode * | getPredecessor (IntervalTreeNode *node) const |
get the predecessor of a given node More... | |
IntervalTreeNode * | getSuccessor (IntervalTreeNode *node) const |
Get the successor of a given node. More... | |
std::deque< SimpleInterval * > | query (Scalar low, Scalar high) |
Return result for a given query. More... | |
Protected Member Functions | |
void | leftRotate (IntervalTreeNode *node) |
left rotation of tree node More... | |
void | rightRotate (IntervalTreeNode *node) |
right rotation of tree node More... | |
void | recursiveInsert (IntervalTreeNode *node) |
Inserts node into the tree as if it were a regular binary tree. More... | |
void | recursivePrint (IntervalTreeNode *node) const |
recursively print a subtree More... | |
IntervalTreeNode * | recursiveSearch (IntervalTreeNode *node, SimpleInterval *ivl) const |
recursively find the node corresponding to the interval More... | |
void | fixupMaxHigh (IntervalTreeNode *node) |
Travels up to the root fixing the max_high fields after an insertion or deletion. More... | |
void | deleteFixup (IntervalTreeNode *node) |
Protected Attributes | |
IntervalTreeNode * | root |
IntervalTreeNode * | invalid_node |
Interval tree.
coal::detail::IntervalTree::IntervalTree | ( | ) |
coal::detail::IntervalTree::~IntervalTree | ( | ) |
|
protected |
SimpleInterval* coal::detail::IntervalTree::deleteNode | ( | IntervalTreeNode * | node | ) |
Delete one node of the interval tree.
void coal::detail::IntervalTree::deleteNode | ( | SimpleInterval * | ivl | ) |
delete node stored a given interval
|
protected |
Travels up to the root fixing the max_high fields after an insertion or deletion.
IntervalTreeNode* coal::detail::IntervalTree::getPredecessor | ( | IntervalTreeNode * | node | ) | const |
get the predecessor of a given node
IntervalTreeNode* coal::detail::IntervalTree::getSuccessor | ( | IntervalTreeNode * | node | ) | const |
Get the successor of a given node.
IntervalTreeNode* coal::detail::IntervalTree::insert | ( | SimpleInterval * | new_interval | ) |
Insert one node of the interval tree.
|
protected |
left rotation of tree node
void coal::detail::IntervalTree::print | ( | ) | const |
Print the whole interval tree.
std::deque<SimpleInterval*> coal::detail::IntervalTree::query | ( | Scalar | low, |
Scalar | high | ||
) |
Return result for a given query.
|
protected |
Inserts node into the tree as if it were a regular binary tree.
|
protected |
recursively print a subtree
|
protected |
recursively find the node corresponding to the interval
|
protected |
right rotation of tree node
|
protected |
|
protected |