Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node Struct Reference

Internally used node structure. More...

#include <QuadTree.h>

List of all members.

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
void vis (utils::VisualizationDescription &d) const
 recursively grabs visualizations commands
void printStructure (int indent)

Public Attributes

AABB boundary
 node boundary
Pt points [CAPACITY]
 contained nodes
Ptnext
 next node to fill
Nodechildren
 pointer to four child-nodes
Nodeparent

Detailed Description

template<class Scalar, int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
struct icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node

Internally used node structure.

Each node can contain up to CAPACITY elements. Further nodes are distributed to one of the four children


Constructor & Destructor Documentation

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::Node ( ) [inline]

empty default constructor (does nothing)

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::Node ( const AABB boundary) [inline]

constructor from given AABB-boundary


Member Function Documentation

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::QuadTree< Scalar, CAPACITY, SF, 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

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::printStructure ( int  indent) [inline]
template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::QuadTree< Scalar, CAPACITY, SF, 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

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::QuadTree< Scalar, CAPACITY, SF, 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

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::vis ( utils::VisualizationDescription d) const [inline]

recursively grabs visualizations commands


Member Data Documentation

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
AABB icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::boundary

node boundary

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
Node* icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::children

pointer to four child-nodes

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
Pt* icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::next

next node to fill

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
Node* icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::parent
template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024>
Pt icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE >::Node::points[CAPACITY]

contained nodes


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines