Util::QuadTree< TYPE >::Node Class Reference
#include <quadtree.h>
Detailed Description
template<class TYPE>
class Util::QuadTree< TYPE >::Node
node in quad tree
Public Member Functions | |
| Node () | |
| constructor | |
| ~Node () | |
| destructor | |
| void | Setup (QuadTree< TYPE > *tree, uchar _level, ushort _col, ushort _row) |
| recursively initialize the node | |
| char | Level () const |
| get the node's level | |
| ushort | Column () const |
| get the node's column | |
| ushort | Row () const |
| get the node's row | |
| const Math::bbox & | GetBoundingBox () const |
| compute the node's bounding box | |
| Node * | FindContainmentNode (const Math::bbox &box) |
| recursively find the smallest child node which contains the bounding box | |
| void | SetElement (const TYPE &elm) |
| set data element associated with node | |
| const TYPE & | GetElement () const |
| get data element | |
| Node * | GetChildAt (IndexT i) |
| get child at index | |
Member Function Documentation
template<class TYPE>
| void Util::QuadTree< TYPE >::Node::Setup | ( | QuadTree< TYPE > * | tree, | |
| uchar | _level, | |||
| ushort | _col, | |||
| ushort | _row | |||
| ) |
recursively initialize the node
Recursively initialize a quad tree node.
template<class TYPE>
| QuadTree< TYPE >::Node * Util::QuadTree< TYPE >::Node::FindContainmentNode | ( | const Math::bbox & | checkBox | ) |
recursively find the smallest child node which contains the bounding box
This finds the smallest child node which completely contains the given bounding box. Calls itself recursively.