 |
Voxomap
A C++11 voxel container.
|
Go to the documentation of this file. 1 #ifndef _VOXOMAP_ITERATOR_HPP_
2 #define _VOXOMAP_ITERATOR_HPP_
9 template <
typename T_SuperContainer>
class VoxelNode;
49 operator bool()
const;
110 template <
typename T>
193 template <
class T_Container>
194 typename std::enable_if<(T_Container::NB_SUPERCONTAINER != 0 && T_Container::SUPERCONTAINER_ID != 0),
bool>::type
findNextContainer(T_Container& container);
196 template <
class T_Container>
197 typename std::enable_if<(T_Container::NB_SUPERCONTAINER != 0 && T_Container::SUPERCONTAINER_ID == 0),
bool>::type
findNextContainer(T_Container& container);
199 template <
class T_Container>
200 typename std::enable_if<(T_Container::NB_SUPERCONTAINER == 0),
bool>::type
findNextContainer(T_Container& container);
205 #include "iterator.ipp"
207 #endif // _VOXOMAP_ITERATOR_HPP_
bool operator==(supercontainer_iterator const &other) const
Returns true if the iterator is same as other.
void end(VoxelNode< T > &node)
Initialize this with the next element after the last voxel of node.
bool findNextChildNode(VoxelNode< T > &i_node)
container_iterator< T > findRelativeVoxel(int x, int y, int z)
bool operator!=(container_iterator const &other) const
Returns true if the iterator is different as other.
uint8_t x
x coordinate of voxel inside node
void findNextParentNode(VoxelNode< T > &i_node)
bool findNextChildNode(VoxelNode< T > &node)
supercontainer_iterator * operator*()
Dereference iterator.
void begin(VoxelNode< T > &node)
Initialize this with the first voxel of node.
bool operator!=(supercontainer_iterator const &other) const
Returns true if the iterator is different as other.
typename T::VoxelContainer VoxelContainer
supercontainer_iterator< T > findRelativeVoxel(int x, int y, int z)
bool operator==(container_iterator const &other) const
Returns true if the iterator is same as other.
std::enable_if<(T_Container::NB_SUPERCONTAINER !=0 &&T_Container::SUPERCONTAINER_ID !=0), bool >::type findNextContainer(T_Container &container)
uint8_t z
z coordinate of voxel inside node
void initPosition(int x, int y, int z)
Initiliaze the iterator with the absolute position.
VoxelData * voxel
Pointer on voxel.
supercontainer_iterator & operator++()
Pre-increment the iterator.
std::enable_if<(T_Container::NB_SUPERCONTAINER !=0 &&T_Container::SUPERCONTAINER_ID==0), bool >::type findNextContainer(T_Container &container)
void getVoxelPosition(int &x, int &y, int &z) const
Get the absolute position of the voxel.
VoxelNode< T > * node
Pointer on node.
void getRelativeVoxelPosition(int &x, int &y, int &z) const
Get the relative position of the voxel inside its node.
void begin(VoxelNode< T > &node)
Initialize this with the first voxel of node.
container_iterator * operator*()
Dereference iterator.
void end(VoxelNode< T > &node)
Initialize this with the next element after the last voxel of node.
void getVoxelPosition(int &x, int &y, int &z) const
Get the absolute position of the voxel.
uint8_t y
y coordinate of voxel inside node
bool findNextVoxel(VoxelContainer &container)
typename T::VoxelData VoxelData
container_iterator operator++(int)
Post increment the iterator.
void initPosition(int x, int y, int z)
Initiliaze the iterator with the absolute position.
void getRelativeVoxelPosition(int &x, int &y, int &z) const
Get the relative position of the voxel inside its node.
VoxelContainer * voxelContainer
Pointer on voxel container.
supercontainer_iterator operator++(int)
Post increment the iterator.
std::enable_if<(T_Container::NB_SUPERCONTAINER==0), bool >::type findNextContainer(T_Container &container)
typename T::Container Container
Position containerPosition[T::NB_SUPERCONTAINER]
Internal positions of the containers.
container_iterator & operator++()
Pre-increment the iterator.
void findNextParentNode(VoxelNode< T > &node)