AggregPacking
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
octree::Octree< T > Class Template Reference

Class representing full octree. More...

#include <octree.hpp>

Public Types

typedef OctreeIterator< T > iterator
 Octree iterator.
 

Public Member Functions

 Octree ()
 Default constructor.
 
 Octree (double x, double y, double z, double size, int depth)
 Constructor. More...
 
 Octree (double x, double y, double z, double size)
 Constructor. More...
 
 ~Octree ()
 Destructor.
 
int getDepth ()
 Getter for depth.
 
double getSize ()
 Getter for size.
 
void build (double x, double y, double z, double size)
 Builds the octree structure. More...
 
OctreeNode< T > * getRoot ()
 Getter for root (by pointer)
 
const OctreeNode< T > * getRoot () const
 Getter for root (by const pointer)
 
void addData (const T &data)
 Adds data to Octree.
 
int getNumberOfNodes ()
 Returns total number of nodes of receiver.
 
OctreeIterator< T > begin ()
 Octree iterator begin.
 
OctreeIterator< T > end ()
 Octree iterator end.
 
OctreeConstIterator< T > begin () const
 Octree const iterator begin.
 
OctreeConstIterator< T > end () const
 Octree const iterator end.
 
void getPotentialNeighbors (vector< T > &answer, double x, double y, double z, double size) const
 Gets potential neighbors around given point and size. More...
 
void getPotentialNeighbors (vector< T > &answer, const T &o) const
 Gets potential neighbors for given object. More...
 
void getPotentialNeighbors (vector< T > &answer, const T &o, int scale) const
 Gets potential neighbors for given object, considering its scaled size. More...
 
vector< T > * py_getPotentialNeighbors (double x, double y, double z, double size) const
 getPotentialNeighbors function for Python
 
vector< T > * py_getPotentialNeighbors (const T &o) const
 getPotentialNeighbors function for Python
 
vector< T > * py_getPotentialNeighbors (const T &o, int scale) const
 getPotentialNeighbors function for Python
 

Private Attributes

int depth
 Depth (number of levels)
 
OctreeNode< T > * root
 Root node.
 

Detailed Description

template<class T>
class octree::Octree< T >

Class representing full octree.

Constructor & Destructor Documentation

template<class T >
octree::Octree< T >::Octree ( double  x,
double  y,
double  z,
double  size,
int  depth 
)

Constructor.

Parameters
xx coordinate of center
yy coordinate of center
zz coordinate of center
sizedimension of octree
depthfinal delth (number of levels)
template<class T>
octree::Octree< T >::Octree ( double  x,
double  y,
double  z,
double  size 
)
inline

Constructor.

Parameters
xx coordinate of center
yy coordinate of center
zz coordinate of center
sizedimension of octree

Member Function Documentation

template<class T >
void octree::Octree< T >::build ( double  x,
double  y,
double  z,
double  size 
)

Builds the octree structure.

Parameters
xx coordinate of the ceter
yy coordinate of the ceter
zz coordinate of the ceter
sizedimension of octree
template<class T>
void octree::Octree< T >::getPotentialNeighbors ( vector< T > &  answer,
double  x,
double  y,
double  z,
double  size 
) const

Gets potential neighbors around given point and size.

Parameters
answerresulting vector of neighbor objects
xx coordinate of center of object
yy coordinate of center of object
zz coordinate of center of object
sizesize of object
template<class T>
void octree::Octree< T >::getPotentialNeighbors ( vector< T > &  answer,
const T &  o 
) const
inline

Gets potential neighbors for given object.

Parameters
answerresulting vector of neighbor objects
ogiven object
template<class T>
void octree::Octree< T >::getPotentialNeighbors ( vector< T > &  answer,
const T &  o,
int  scale 
) const
inline

Gets potential neighbors for given object, considering its scaled size.

Parameters
answerresulting vector of neighbor objects
ogiven object
scalescale for object's size

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