Image Component Library (ICL)
Public Member Functions | Public Attributes | List of all members
icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE, VECTOR_TYPE >::Node Struct Reference

Internally used node structure. More...

#include <QuadTree.h>

Public Member Functions

 Node ()
 empty default constructor (does nothing) More...
 
 Node (const AABB &boundary)
 constructor from given AABB-boundary More...
 
void init (Node *parent, const AABB &boundary)
 initialization methods (with given boundary) More...
 
void query (const AABB &boundary, std::vector< Pt > &found) const
 recursive getter function that queries all nodes within a given bounding box More...
 
void split (Node *children)
 creates the children for this node More...
 
void vis (utils::VisualizationDescription &d) const
 recursively grabs visualizations commands More...
 
void printStructure (int indent)
 

Public Attributes

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

Detailed Description

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

◆ Node() [1/2]

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

empty default constructor (does nothing)

◆ Node() [2/2]

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

constructor from given AABB-boundary

Member Function Documentation

◆ init()

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024, class VECTOR_TYPE = FixedColVector<Scalar,2>>
void icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE, VECTOR_TYPE >::Node::init ( Node parent,
const AABB boundary 
)
inline

initialization methods (with given boundary)

sets next to points-begin and children to NULL

◆ printStructure()

template<class Scalar , int CAPACITY = 4, int SF = 1, int ALLOC_CHUNK_SIZE = 1024, class VECTOR_TYPE = FixedColVector<Scalar,2>>
void icl::math::QuadTree< Scalar, CAPACITY, SF, ALLOC_CHUNK_SIZE, VECTOR_TYPE >::Node::printStructure ( int  indent)
inline

◆ query()

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

◆ split()

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

◆ vis()

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

recursively grabs visualizations commands

Member Data Documentation

◆ boundary

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

node boundary

◆ children

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

pointer to four child-nodes

◆ next

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

next node to fill

◆ parent

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

◆ points

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

contained nodes


The documentation for this struct was generated from the following file: