Voxomap
A C++11 voxel container.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
voxomap::supercontainer_iterator< T > Struct Template Reference

#include <iterator.hpp>

Inheritance diagram for voxomap::supercontainer_iterator< T >:

Classes

struct  Position
 

Public Types

using Container = typename T::Container
 
using VoxelContainer = typename container_iterator< T >::VoxelContainer
 
- Public Types inherited from voxomap::container_iterator< T >
using VoxelData = typename T::VoxelData
 
using VoxelContainer = typename T::VoxelContainer
 

Public Member Functions

supercontainer_iteratoroperator++ ()
 Pre-increment the iterator. More...
 
supercontainer_iterator operator++ (int)
 Post increment the iterator. More...
 
supercontainer_iteratoroperator* ()
 Dereference iterator. More...
 
bool operator== (supercontainer_iterator const &other) const
 Returns true if the iterator is same as other. More...
 
bool operator!= (supercontainer_iterator const &other) const
 Returns true if the iterator is different as other. More...
 
void begin (VoxelNode< T > &node)
 Initialize this with the first voxel of node. More...
 
void end (VoxelNode< T > &node)
 Initialize this with the next element after the last voxel of node. More...
 
void getVoxelPosition (int &x, int &y, int &z) const
 Get the absolute position of the voxel. More...
 
void getRelativeVoxelPosition (int &x, int &y, int &z) const
 Get the relative position of the voxel inside its node. More...
 
void initPosition (int x, int y, int z)
 Initiliaze the iterator with the absolute position. More...
 
int getRelativeX () const
 
int getRelativeY () const
 
int getRelativeZ () const
 
int getAbsoluteX () const
 
int getAbsoluteY () const
 
int getAbsoluteZ () const
 
supercontainer_iterator< T > findRelativeVoxel (int x, int y, int z)
 
- Public Member Functions inherited from voxomap::container_iterator< T >
container_iteratoroperator++ ()
 Pre-increment the iterator. More...
 
container_iterator operator++ (int)
 Post increment the iterator. More...
 
container_iteratoroperator* ()
 Dereference iterator. More...
 
 operator bool () const
 Returns true if the iterator is valid. More...
 
bool operator== (container_iterator const &other) const
 Returns true if the iterator is same as other. More...
 
bool operator!= (container_iterator const &other) const
 Returns true if the iterator is different as other. More...
 
void begin (VoxelNode< T > &node)
 Initialize this with the first voxel of node. More...
 
void end (VoxelNode< T > &node)
 Initialize this with the next element after the last voxel of node. More...
 
void getVoxelPosition (int &x, int &y, int &z) const
 Get the absolute position of the voxel. More...
 
void getRelativeVoxelPosition (int &x, int &y, int &z) const
 Get the relative position of the voxel inside its node. More...
 
void initPosition (int x, int y, int z)
 Initiliaze the iterator with the absolute position. More...
 
int getRelativeX () const
 
int getRelativeY () const
 
int getRelativeZ () const
 
int getAbsoluteX () const
 
int getAbsoluteY () const
 
int getAbsoluteZ () const
 
container_iterator< T > findRelativeVoxel (int x, int y, int z)
 

Public Attributes

Position containerPosition [T::NB_SUPERCONTAINER]
 Internal positions of the containers. More...
 
- Public Attributes inherited from voxomap::container_iterator< T >
VoxelNode< T > * node = nullptr
 Pointer on node. More...
 
VoxelContainervoxelContainer = nullptr
 Pointer on voxel container. More...
 
VoxelDatavoxel = nullptr
 Pointer on voxel. More...
 
uint8_t x = 0
 x coordinate of voxel inside node More...
 
uint8_t y = 0
 y coordinate of voxel inside node More...
 
uint8_t z = 0
 z coordinate of voxel inside node More...
 

Private Member Functions

bool findNextChildNode (VoxelNode< T > &node)
 
void findNextParentNode (VoxelNode< T > &node)
 
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER !=0 &&T_Container::SUPERCONTAINER_ID !=0), bool >::type findNextContainer (T_Container &container)
 
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER !=0 &&T_Container::SUPERCONTAINER_ID==0), bool >::type findNextContainer (T_Container &container)
 
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER==0), bool >::type findNextContainer (T_Container &container)
 

Additional Inherited Members

- Protected Member Functions inherited from voxomap::container_iterator< T >
void findNextParentNode (VoxelNode< T > &i_node)
 
bool findNextChildNode (VoxelNode< T > &i_node)
 
bool findNextVoxel (VoxelContainer &container)
 

Detailed Description

template<typename T>
struct voxomap::supercontainer_iterator< T >

Definition at line 111 of file iterator.hpp.

Member Typedef Documentation

◆ Container

template<typename T >
using voxomap::supercontainer_iterator< T >::Container = typename T::Container

Definition at line 113 of file iterator.hpp.

◆ VoxelContainer

template<typename T >
using voxomap::supercontainer_iterator< T >::VoxelContainer = typename container_iterator<T>::VoxelContainer

Definition at line 114 of file iterator.hpp.

Member Function Documentation

◆ operator++() [1/2]

template<typename T >
supercontainer_iterator& voxomap::supercontainer_iterator< T >::operator++ ( )

Pre-increment the iterator.

Returns
Reference on this

◆ operator++() [2/2]

template<typename T >
supercontainer_iterator voxomap::supercontainer_iterator< T >::operator++ ( int  )

Post increment the iterator.

Returns
Not incremented iterator

◆ operator*()

template<typename T >
supercontainer_iterator* voxomap::supercontainer_iterator< T >::operator* ( )

Dereference iterator.

◆ operator==()

template<typename T >
bool voxomap::supercontainer_iterator< T >::operator== ( supercontainer_iterator< T > const &  other) const

Returns true if the iterator is same as other.

◆ operator!=()

template<typename T >
bool voxomap::supercontainer_iterator< T >::operator!= ( supercontainer_iterator< T > const &  other) const

Returns true if the iterator is different as other.

◆ begin()

template<typename T >
void voxomap::supercontainer_iterator< T >::begin ( VoxelNode< T > &  node)

Initialize this with the first voxel of node.

Parameters
node

◆ end()

template<typename T >
void voxomap::supercontainer_iterator< T >::end ( VoxelNode< T > &  node)

Initialize this with the next element after the last voxel of node.

Parameters
node

◆ getVoxelPosition()

template<typename T >
void voxomap::supercontainer_iterator< T >::getVoxelPosition ( int &  x,
int &  y,
int &  z 
) const

Get the absolute position of the voxel.

Parameters
xX position of voxel
yY position of voxel
zZ position of voxel

◆ getRelativeVoxelPosition()

template<typename T >
void voxomap::supercontainer_iterator< T >::getRelativeVoxelPosition ( int &  x,
int &  y,
int &  z 
) const

Get the relative position of the voxel inside its node.

Parameters
xX position of voxel
yY position of voxel
zZ position of voxel

◆ initPosition()

template<typename T >
void voxomap::supercontainer_iterator< T >::initPosition ( int  x,
int  y,
int  z 
)

Initiliaze the iterator with the absolute position.

Parameters
xX position of the voxel
yY position of the voxel
zZ position of the voxel

◆ getRelativeX()

template<typename T >
int voxomap::supercontainer_iterator< T >::getRelativeX ( ) const

◆ getRelativeY()

template<typename T >
int voxomap::supercontainer_iterator< T >::getRelativeY ( ) const

◆ getRelativeZ()

template<typename T >
int voxomap::supercontainer_iterator< T >::getRelativeZ ( ) const

◆ getAbsoluteX()

template<typename T >
int voxomap::supercontainer_iterator< T >::getAbsoluteX ( ) const

◆ getAbsoluteY()

template<typename T >
int voxomap::supercontainer_iterator< T >::getAbsoluteY ( ) const

◆ getAbsoluteZ()

template<typename T >
int voxomap::supercontainer_iterator< T >::getAbsoluteZ ( ) const

◆ findRelativeVoxel()

template<typename T >
supercontainer_iterator<T> voxomap::supercontainer_iterator< T >::findRelativeVoxel ( int  x,
int  y,
int  z 
)

◆ findNextChildNode()

template<typename T >
bool voxomap::supercontainer_iterator< T >::findNextChildNode ( VoxelNode< T > &  node)
private

◆ findNextParentNode()

template<typename T >
void voxomap::supercontainer_iterator< T >::findNextParentNode ( VoxelNode< T > &  node)
private

◆ findNextContainer() [1/3]

template<typename T >
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER != 0 && T_Container::SUPERCONTAINER_ID != 0), bool>::type voxomap::supercontainer_iterator< T >::findNextContainer ( T_Container &  container)
private

◆ findNextContainer() [2/3]

template<typename T >
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER != 0 && T_Container::SUPERCONTAINER_ID == 0), bool>::type voxomap::supercontainer_iterator< T >::findNextContainer ( T_Container &  container)
private

◆ findNextContainer() [3/3]

template<typename T >
template<class T_Container >
std::enable_if<(T_Container::NB_SUPERCONTAINER == 0), bool>::type voxomap::supercontainer_iterator< T >::findNextContainer ( T_Container &  container)
private

Member Data Documentation

◆ containerPosition

template<typename T >
Position voxomap::supercontainer_iterator< T >::containerPosition[T::NB_SUPERCONTAINER]

Internal positions of the containers.

Definition at line 122 of file iterator.hpp.


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