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

Internally used node structure. More...

#include <Octree.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

Public Attributes

AABB boundary
 node boundary
Pt points [CAPACITY]
 contained nodes
Pt * next
 next node to fill
Nodechildren
 pointer to four child-nodes
Nodeparent
 parent node
float radius
 aabb radius (can be used for bounding sphere tests)

Detailed Description

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
struct icl::math::Octree< Scalar, CAPACITY, SF, Pt, 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 = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::Node ( ) [inline]

empty default constructor (does nothing)

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

constructor from given AABB-boundary


Member Function Documentation

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
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

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
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

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
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


Member Data Documentation

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

node boundary

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

pointer to four child-nodes

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

next node to fill

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
Node* icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::parent

parent node

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
Pt icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::points[CAPACITY]

contained nodes

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
float icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Node::radius

aabb radius (can be used for bounding sphere tests)


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