Simox  2.3.50
VirtualRobot::VoxelTree6DElement< T > Class Template Reference

Public Member Functions

 VoxelTree6DElement (float p[6], float extends[6], int level, int maxLevels)
 
virtual ~VoxelTree6DElement ()
 
bool setEntry (float p[6], const T &e)
 
bool hasEntry (float p[6])
 
T * getEntry (float p[6])
 
bool isLeaf ()
 
T * getEntry ()
 if isLeaf the corresponding entry is returned More...
 

Protected Member Functions

VoxelTree6DElement< T > * createChild (float p[6])
 
int getChildIndx (float p[6])
 
bool covers (float p[6])
 

Protected Attributes

VoxelTree6DElementchildren [64]
 
T * entry
 
bool leaf
 
float extends [6]
 
float pos [6]
 
int level
 
int maxLevels
 

Detailed Description

template<typename T>
class VirtualRobot::VoxelTree6DElement< T >

A template definition for storing elements of a voxelized 6d grid. Internally the elements are copied!

Constructor & Destructor Documentation

template<typename T>
VirtualRobot::VoxelTree6DElement< T >::VoxelTree6DElement ( float  p[6],
float  extends[6],
int  level,
int  maxLevels 
)
inline

Construct en element at position p with given extends.

template<typename T>
virtual VirtualRobot::VoxelTree6DElement< T >::~VoxelTree6DElement ( )
inlinevirtual

Member Function Documentation

template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::covers ( float  p[6])
inlineprotected
template<typename T>
VoxelTree6DElement<T>* VirtualRobot::VoxelTree6DElement< T >::createChild ( float  p[6])
inlineprotected
template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::getChildIndx ( float  p[6])
inlineprotected
template<typename T>
T* VirtualRobot::VoxelTree6DElement< T >::getEntry ( float  p[6])
inline

Returns pointer to element when existing. NULL if not.

template<typename T>
T* VirtualRobot::VoxelTree6DElement< T >::getEntry ( )
inline

if isLeaf the corresponding entry is returned

template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::hasEntry ( float  p[6])
inline

Checks if there is an entry at the given position. True when this node is a leaf and the entry is set or the child at p exists and returns true on getChild(p)->hasEntry(p).

template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::isLeaf ( )
inline
template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::setEntry ( float  p[6],
const T &  e 
)
inline

Automatically checks if a new child element has to be created. A copy of e is stored.

Field Documentation

template<typename T>
VoxelTree6DElement* VirtualRobot::VoxelTree6DElement< T >::children[64]
protected
template<typename T>
T* VirtualRobot::VoxelTree6DElement< T >::entry
protected
template<typename T>
float VirtualRobot::VoxelTree6DElement< T >::extends[6]
protected
template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::leaf
protected
template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::level
protected
template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::maxLevels
protected
template<typename T>
float VirtualRobot::VoxelTree6DElement< T >::pos[6]
protected