#include <SubmapIterator.hpp>
Public Member Functions | |
const Index & | getSubmapIndex () const |
const Size & | getSubmapSize () const |
bool | isPastEnd () const |
bool | operator!= (const SubmapIterator &other) const |
const Index & | operator* () const |
SubmapIterator & | operator++ () |
SubmapIterator (const grid_map::SubmapGeometry &submap) | |
SubmapIterator (const grid_map::GridMap &gridMap, const grid_map::BufferRegion &bufferRegion) | |
SubmapIterator (const grid_map::GridMap &gridMap, const Index &submapStartIndex, const Size &submapSize) | |
SubmapIterator (const SubmapIterator *other) | |
Private Attributes | |
Index | index_ |
Current index. More... | |
bool | isPastEnd_ |
Is iterator out of scope. More... | |
Size | size_ |
Size of the buffer. More... | |
Index | startIndex_ |
Start index of the circular buffer. More... | |
Index | submapIndex_ |
Current index in the submap. More... | |
Size | submapSize_ |
Submap buffer size. More... | |
Index | submapStartIndex_ |
Top left index of the submap. More... | |
Iterator class to iterate through a rectangular part of the map (submap). Before using this iterator, make sure that the requested submap is actually contained in the grid map.
Definition at line 24 of file SubmapIterator.hpp.
grid_map::SubmapIterator::SubmapIterator | ( | const grid_map::SubmapGeometry & | submap | ) |
Constructor.
submap | the submap geometry to iterate over. |
Definition at line 16 of file SubmapIterator.cpp.
grid_map::SubmapIterator::SubmapIterator | ( | const grid_map::GridMap & | gridMap, |
const grid_map::BufferRegion & | bufferRegion | ||
) |
Constructor.
submap | the buffer region of a grid map to iterate over. |
Definition at line 21 of file SubmapIterator.cpp.
grid_map::SubmapIterator::SubmapIterator | ( | const grid_map::GridMap & | gridMap, |
const Index & | submapStartIndex, | ||
const Size & | submapSize | ||
) |
Constructor.
gridMap | the grid map to iterate on. |
submapStartIndex | the start index of the submap, typically top-left index. |
submapSize | the size of the submap to iterate on. |
Definition at line 28 of file SubmapIterator.cpp.
grid_map::SubmapIterator::SubmapIterator | ( | const SubmapIterator * | other | ) |
Copy constructor.
other | the object to copy. |
Definition at line 40 of file SubmapIterator.cpp.
const Index & grid_map::SubmapIterator::getSubmapIndex | ( | ) | const |
Get the current index in the submap.
Definition at line 61 of file SubmapIterator.cpp.
const Size & grid_map::SubmapIterator::getSubmapSize | ( | ) | const |
Returns the size of the submap covered by the iterator.
Definition at line 78 of file SubmapIterator.cpp.
bool grid_map::SubmapIterator::isPastEnd | ( | ) | const |
Indicates if iterator is past end.
Definition at line 73 of file SubmapIterator.cpp.
bool grid_map::SubmapIterator::operator!= | ( | const SubmapIterator & | other | ) | const |
Compare to another iterator.
Definition at line 51 of file SubmapIterator.cpp.
const Index & grid_map::SubmapIterator::operator* | ( | ) | const |
Dereference the iterator with const.
Definition at line 56 of file SubmapIterator.cpp.
SubmapIterator & grid_map::SubmapIterator::operator++ | ( | ) |
Increase the iterator to the next element.
Definition at line 66 of file SubmapIterator.cpp.
|
private |
Current index.
Definition at line 100 of file SubmapIterator.hpp.
|
private |
Is iterator out of scope.
Definition at line 112 of file SubmapIterator.hpp.
|
private |
Size of the buffer.
Definition at line 94 of file SubmapIterator.hpp.
|
private |
Start index of the circular buffer.
Definition at line 97 of file SubmapIterator.hpp.
|
private |
Current index in the submap.
Definition at line 109 of file SubmapIterator.hpp.
|
private |
Submap buffer size.
Definition at line 103 of file SubmapIterator.hpp.
|
private |
Top left index of the submap.
Definition at line 106 of file SubmapIterator.hpp.