|
Nebula
|
#include <quadtree.h>
Classes | |
| class | Node |
| node in quad tree More... | |
Public Member Functions | |
| QuadTree () | |
| constructor | |
| ~QuadTree () | |
| destructor | |
| void | Setup (const Math::bbox &box, uchar depth) |
| initialize quad tree | |
| const Math::bbox & | GetBoundingBox () const |
| get the top level bounding box | |
| uchar | GetDepth () const |
| get the tree depth | |
| SizeT | GetNumNodes (uchar level) const |
| compute number of nodes in a level, including its children | |
| IndexT | GetNodeIndex (uchar level, ushort col, ushort row) const |
| compute linear chunk index from level, col and row | |
| SizeT | GetNumNodesInTree () const |
| get overall number of nodes in the tree | |
| const Node & | GetNodeByIndex (IndexT i) const |
| get pointer to node by index | |
| Node & | NodeByIndex (IndexT i) |
| read/write access to node | |
| Node * | FindContainmentNode (const Math::bbox &box) |
| recursively find the smallest child node which contains the bounding box | |
Private Attributes | |
| uchar | treeDepth |
| Math::bbox | boundingBox |
| Math::vector | baseNodeSize |
| Util::FixedArray< Node > | nodeArray |
Friends | |
| class | Node |
| QuadTree::QuadTree | ( | ) |
constructor
QuadTree constructor.
| QuadTree::~QuadTree | ( | ) |
destructor
QuadTree destructor.
| QuadTree< TYPE >::Node * QuadTree::FindContainmentNode | ( | const Math::bbox & | box | ) |
recursively find the smallest child node which contains the bounding box
Find the biggest quad tree which completely contains the provided bounding box.
| const Math::bbox & QuadTree::GetBoundingBox | ( | ) | const |
get the top level bounding box
Returns top level bounding box of quad tree.
| uchar QuadTree::GetDepth | ( | ) | const |
get the tree depth
Returns depth of quad tree.
get pointer to node by index
compute linear chunk index from level, col and row
Computes a linear chunk index for a chunk address consisting of level, col and row.
compute number of nodes in a level, including its children
Computes number of nodes in a level, including its child nodes.
| SizeT QuadTree::GetNumNodesInTree | ( | ) | const |
get overall number of nodes in the tree
Returns the overall number of nodes in the tree for linear access.
read/write access to node
| void QuadTree::Setup | ( | const Math::bbox & | box, |
| uchar | depth ) |
initialize quad tree
Initialize the quad tree.
|
friend |
|
private |
|
private |
|
private |
|
private |