Voxomap
A C++11 voxel container.
|
#include <iterator.hpp>
Classes | |
struct | Position |
Public Types | |
using | Container = typename T::Container |
using | VoxelContainer = typename container_iterator< T >::VoxelContainer |
![]() | |
using | VoxelData = typename T::VoxelData |
using | VoxelContainer = typename T::VoxelContainer |
Public Member Functions | |
supercontainer_iterator & | operator++ () |
Pre-increment the iterator. More... | |
supercontainer_iterator | operator++ (int) |
Post increment the iterator. More... | |
supercontainer_iterator * | operator* () |
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) |
![]() | |
container_iterator & | operator++ () |
Pre-increment the iterator. More... | |
container_iterator | operator++ (int) |
Post increment the iterator. More... | |
container_iterator * | operator* () |
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... | |
![]() | |
VoxelNode< T > * | node = nullptr |
Pointer on node. More... | |
VoxelContainer * | voxelContainer = nullptr |
Pointer on voxel container. More... | |
VoxelData * | voxel = 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 | |
![]() | |
void | findNextParentNode (VoxelNode< T > &i_node) |
bool | findNextChildNode (VoxelNode< T > &i_node) |
bool | findNextVoxel (VoxelContainer &container) |
Definition at line 111 of file iterator.hpp.
using voxomap::supercontainer_iterator< T >::Container = typename T::Container |
Definition at line 113 of file iterator.hpp.
using voxomap::supercontainer_iterator< T >::VoxelContainer = typename container_iterator<T>::VoxelContainer |
Definition at line 114 of file iterator.hpp.
supercontainer_iterator& voxomap::supercontainer_iterator< T >::operator++ | ( | ) |
Pre-increment the iterator.
supercontainer_iterator voxomap::supercontainer_iterator< T >::operator++ | ( | int | ) |
Post increment the iterator.
supercontainer_iterator* voxomap::supercontainer_iterator< T >::operator* | ( | ) |
Dereference iterator.
bool voxomap::supercontainer_iterator< T >::operator== | ( | supercontainer_iterator< T > const & | other | ) | const |
Returns true if the iterator is same as other.
bool voxomap::supercontainer_iterator< T >::operator!= | ( | supercontainer_iterator< T > const & | other | ) | const |
Returns true if the iterator is different as other.
void voxomap::supercontainer_iterator< T >::begin | ( | VoxelNode< T > & | node | ) |
Initialize this with the first voxel of node.
node |
void voxomap::supercontainer_iterator< T >::end | ( | VoxelNode< T > & | node | ) |
Initialize this with the next element after the last voxel of node.
node |
void voxomap::supercontainer_iterator< T >::getVoxelPosition | ( | int & | x, |
int & | y, | ||
int & | z | ||
) | const |
Get the absolute position of the voxel.
x | X position of voxel |
y | Y position of voxel |
z | Z position of voxel |
void voxomap::supercontainer_iterator< T >::getRelativeVoxelPosition | ( | int & | x, |
int & | y, | ||
int & | z | ||
) | const |
Get the relative position of the voxel inside its node.
x | X position of voxel |
y | Y position of voxel |
z | Z position of voxel |
void voxomap::supercontainer_iterator< T >::initPosition | ( | int | x, |
int | y, | ||
int | z | ||
) |
Initiliaze the iterator with the absolute position.
x | X position of the voxel |
y | Y position of the voxel |
z | Z position of the voxel |
int voxomap::supercontainer_iterator< T >::getRelativeX | ( | ) | const |
int voxomap::supercontainer_iterator< T >::getRelativeY | ( | ) | const |
int voxomap::supercontainer_iterator< T >::getRelativeZ | ( | ) | const |
int voxomap::supercontainer_iterator< T >::getAbsoluteX | ( | ) | const |
int voxomap::supercontainer_iterator< T >::getAbsoluteY | ( | ) | const |
int voxomap::supercontainer_iterator< T >::getAbsoluteZ | ( | ) | const |
supercontainer_iterator<T> voxomap::supercontainer_iterator< T >::findRelativeVoxel | ( | int | x, |
int | y, | ||
int | z | ||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
Position voxomap::supercontainer_iterator< T >::containerPosition[T::NB_SUPERCONTAINER] |
Internal positions of the containers.
Definition at line 122 of file iterator.hpp.