Image Component Library (ICL)
|
Internally used node structure. More...
#include <Octree.h>
Public Member Functions | |
Node () | |
empty default constructor (does nothing) | |
Node (const AABB &boundary) | |
constructor from given AABB-boundary | |
void | init (Node *parent, const AABB &boundary) |
initialization methods (with given boundary) | |
void | query (const AABB &boundary, std::vector< Pt > &found) const |
recursive getter function that queries all nodes within a given bounding box | |
void | split (Node *children) |
creates the children for this node | |
Public Attributes | |
AABB | boundary |
node boundary | |
Pt | points [CAPACITY] |
contained nodes | |
Pt * | next |
next node to fill | |
Node * | children |
pointer to four child-nodes | |
Node * | parent |
parent node | |
float | radius |
aabb radius (can be used for bounding sphere tests) |
Internally used node structure.
Each node can contain up to CAPACITY elements. Further nodes are distributed to one of the four children
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::Node | ( | ) | [inline] |
empty default constructor (does nothing)
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::Node | ( | const AABB & | boundary | ) | [inline] |
constructor from given AABB-boundary
void icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::init | ( | Node * | parent, |
const AABB & | boundary | ||
) | [inline] |
initialization methods (with given boundary)
sets next to points-begin and children to NULL
void icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::query | ( | const AABB & | boundary, |
std::vector< Pt > & | found | ||
) | const [inline] |
recursive getter function that queries all nodes within a given bounding box
breaks the recursion if no children are present or if the nodes boundary does not intersect with the given boundary. Recursively fills the given 'found'-vector
void icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::split | ( | Node * | children | ) | [inline] |
creates the children for this node
children order is ul, ur, ll, lr. The children are created by the top-level QuadTree's allocator and passed to this function. 'split' initializes the four given children
AABB icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::boundary |
node boundary
Node* icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::children |
pointer to four child-nodes
Pt* icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::next |
next node to fill
Node* icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::parent |
parent node
Pt icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::points[CAPACITY] |
contained nodes
float icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::radius |
aabb radius (can be used for bounding sphere tests)