#include <GridMapIterator.hpp>
Public Member Functions | |
GridMapIterator | end () const |
const size_t & | getLinearIndex () const |
const Index | getUnwrappedIndex () const |
GridMapIterator (const grid_map::GridMap &gridMap) | |
GridMapIterator (const GridMapIterator *other) | |
bool | isPastEnd () const |
bool | operator!= (const GridMapIterator &other) const |
const Index | operator* () const |
virtual GridMapIterator & | operator++ () |
GridMapIterator & | operator= (const GridMapIterator &other) |
Protected Attributes | |
bool | isPastEnd_ |
Is iterator out of scope. | |
size_t | linearIndex_ |
Linear index. | |
size_t | linearSize_ |
Linear size of the data. | |
Size | size_ |
Size of the buffer. | |
Index | startIndex_ |
Start index of the circular buffer. |
Iterator class to iterate trough the entire grid map.
Definition at line 21 of file GridMapIterator.hpp.
grid_map::GridMapIterator::GridMapIterator | ( | const grid_map::GridMap & | gridMap | ) |
Constructor.
gridMap | the grid map to iterate on. |
Definition at line 14 of file GridMapIterator.cpp.
grid_map::GridMapIterator::GridMapIterator | ( | const GridMapIterator * | other | ) |
Copy constructor.
other | the object to copy. |
Definition at line 23 of file GridMapIterator.cpp.
Return the end iterator
Definition at line 73 of file GridMapIterator.cpp.
const size_t & grid_map::GridMapIterator::getLinearIndex | ( | ) | const |
Returns the the linear (1-dim.) index of the cell the iterator is pointing at. Note: Use this access for improved efficiency when working with large maps. Example: See `runGridMapIteratorVersion3()` of `grid_map_demos/src/iterator_benchmark.cpp`.
Definition at line 52 of file GridMapIterator.cpp.
const Index grid_map::GridMapIterator::getUnwrappedIndex | ( | ) | const |
Retrieve the index as unwrapped index, i.e., as the corresponding index of a grid map with no circular buffer offset.
Definition at line 57 of file GridMapIterator.cpp.
bool grid_map::GridMapIterator::isPastEnd | ( | ) | const |
Indicates if iterator is past end.
Definition at line 80 of file GridMapIterator.cpp.
bool grid_map::GridMapIterator::operator!= | ( | const GridMapIterator & | other | ) | const |
Compare to another iterator.
Definition at line 42 of file GridMapIterator.cpp.
const Index grid_map::GridMapIterator::operator* | ( | ) | const |
Dereference the iterator to return the regular index (2-dim.) of the cell to which the iterator is pointing at.
Definition at line 47 of file GridMapIterator.cpp.
GridMapIterator & grid_map::GridMapIterator::operator++ | ( | ) | [virtual] |
Increase the iterator to the next element.
Reimplemented in grid_map::SlidingWindowIterator.
Definition at line 62 of file GridMapIterator.cpp.
GridMapIterator & grid_map::GridMapIterator::operator= | ( | const GridMapIterator & | other | ) |
Assignment operator.
iterator | the iterator to copy data from. |
Definition at line 32 of file GridMapIterator.cpp.
bool grid_map::GridMapIterator::isPastEnd_ [protected] |
Is iterator out of scope.
Definition at line 104 of file GridMapIterator.hpp.
size_t grid_map::GridMapIterator::linearIndex_ [protected] |
Linear index.
Definition at line 101 of file GridMapIterator.hpp.
size_t grid_map::GridMapIterator::linearSize_ [protected] |
Linear size of the data.
Definition at line 98 of file GridMapIterator.hpp.
Size grid_map::GridMapIterator::size_ [protected] |
Size of the buffer.
Definition at line 92 of file GridMapIterator.hpp.
Index grid_map::GridMapIterator::startIndex_ [protected] |
Start index of the circular buffer.
Definition at line 95 of file GridMapIterator.hpp.