Simox  2.3.74.0
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

◆ VoxelTree6DElement()

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

Construct en element at position p with given extends.

◆ ~VoxelTree6DElement()

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

Member Function Documentation

◆ covers()

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

◆ createChild()

template<typename T>
VoxelTree6DElement<T>* VirtualRobot::VoxelTree6DElement< T >::createChild ( float  p[6])
inlineprotected

◆ getChildIndx()

template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::getChildIndx ( float  p[6])
inlineprotected

◆ getEntry() [1/2]

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

Returns pointer to element when existing. NULL if not.

◆ getEntry() [2/2]

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

if isLeaf the corresponding entry is returned

◆ hasEntry()

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).

◆ isLeaf()

template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::isLeaf ( )
inline

◆ setEntry()

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

◆ children

template<typename T>
VoxelTree6DElement* VirtualRobot::VoxelTree6DElement< T >::children[64]
protected

◆ entry

template<typename T>
T* VirtualRobot::VoxelTree6DElement< T >::entry
protected

◆ extends

template<typename T>
float VirtualRobot::VoxelTree6DElement< T >::extends[6]
protected

◆ leaf

template<typename T>
bool VirtualRobot::VoxelTree6DElement< T >::leaf
protected

◆ level

template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::level
protected

◆ maxLevels

template<typename T>
int VirtualRobot::VoxelTree6DElement< T >::maxLevels
protected

◆ pos

template<typename T>
float VirtualRobot::VoxelTree6DElement< T >::pos[6]
protected