Nebula
|
#include <quadtree.h>
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 | |
Private Attributes | |
Node * | children [4] |
char | level |
ushort | col |
ushort | row |
Math::bbox | box |
TYPE | element |
Friends | |
class | QuadTree |
Util::QuadTree< TYPE >::Node::Node | ( | ) |
constructor
Util::QuadTree< TYPE >::Node::~Node | ( | ) |
destructor
ushort Util::QuadTree< TYPE >::Node::Column | ( | ) | const |
get the node's column
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.
const Math::bbox & Util::QuadTree< TYPE >::Node::GetBoundingBox | ( | ) | const |
compute the node's bounding box
QuadTree< TYPE >::Node * Util::QuadTree< TYPE >::Node::GetChildAt | ( | IndexT | i | ) |
get child at index
const TYPE & Util::QuadTree< TYPE >::Node::GetElement | ( | ) | const |
get data element
char Util::QuadTree< TYPE >::Node::Level | ( | ) | const |
get the node's level
ushort Util::QuadTree< TYPE >::Node::Row | ( | ) | const |
get the node's row
void Util::QuadTree< TYPE >::Node::SetElement | ( | const TYPE & | elm | ) |
set data element associated with node
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.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |