#include <perfect_spatial_hashing.h>
Public Member Functions | |
NeighboringEntryIterator (const vcg::Point3i &entry, const int table_size) | |
vcg::Point3i | operator* () |
void | operator++ (int) |
bool | operator< (const int value) |
NeighboringEntryIterator & | operator= (const NeighboringEntryIterator &it) |
Protected Attributes | |
vcg::Point3i | m_Center |
int | m_CurrentIteration |
vcg::Point3i | m_CurrentNeighbor |
int | m_TableSize |
This class provides a convenient way to iterate over the six neighboring cells of a given cell.
Definition at line 107 of file perfect_spatial_hashing.h.
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::NeighboringEntryIterator | ( | const vcg::Point3i & | entry, | |
const int | table_size | |||
) | [inline] |
Default constructor.
[in] | entry | The index of the cell in the UniformGrid around which iterate. |
[in] | table_size | The number of cells in the UniformGrid for each side. |
Definition at line 114 of file perfect_spatial_hashing.h.
vcg::Point3i vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::operator* | ( | ) | [inline] |
Dereferencing operator
Definition at line 144 of file perfect_spatial_hashing.h.
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::operator++ | ( | int | ) | [inline] |
Increment the iterator to point to the next neighboring entry in the UniformGrid
Definition at line 127 of file perfect_spatial_hashing.h.
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::operator< | ( | const int | value | ) | [inline] |
Less than operator. Since each entry in the UniformGrid has only 6 neighbors, the iterator over the neighboring entries can be compared with an integer.
Definition at line 164 of file perfect_spatial_hashing.h.
NeighboringEntryIterator& vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::operator= | ( | const NeighboringEntryIterator & | it | ) | [inline] |
Assignment operator
[in] | The | source neighboring iterator |
Definition at line 151 of file perfect_spatial_hashing.h.
vcg::Point3i vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::m_Center [protected] |
The cell whose neighboring cells are to be looked up.
Definition at line 167 of file perfect_spatial_hashing.h.
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::m_CurrentIteration [protected] |
The current iteration.
Definition at line 169 of file perfect_spatial_hashing.h.
vcg::Point3i vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::m_CurrentNeighbor [protected] |
The neighboring cell at the current iteration.
Definition at line 168 of file perfect_spatial_hashing.h.
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::NeighboringEntryIterator::m_TableSize [protected] |
The number of cell in the UniformGrid for each side
Definition at line 170 of file perfect_spatial_hashing.h.