#include <PolygonIterator.hpp>
Public Member Functions | |
bool | isPastEnd () const |
bool | operator!= (const PolygonIterator &other) const |
const Index & | operator* () const |
PolygonIterator & | operator++ () |
PolygonIterator & | operator= (const PolygonIterator &other) |
PolygonIterator (const grid_map::GridMap &gridMap, const grid_map::Polygon &polygon) | |
Private Member Functions | |
void | findSubmapParameters (const grid_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const |
bool | isInside () const |
Private Attributes | |
Size | bufferSize_ |
Index | bufferStartIndex_ |
std::shared_ptr< SubmapIterator > | internalIterator_ |
Grid submap iterator. More... | |
Length | mapLength_ |
Map information needed to get position from iterator. More... | |
Position | mapPosition_ |
grid_map::Polygon | polygon_ |
Polygon to iterate on. More... | |
double | resolution_ |
Iterator class to iterate through a polygonal area of the map.
Definition at line 22 of file PolygonIterator.hpp.
grid_map::PolygonIterator::PolygonIterator | ( | const grid_map::GridMap & | gridMap, |
const grid_map::Polygon & | polygon | ||
) |
Constructor.
gridMap | the grid map to iterate on. |
polygon | the polygonal area to iterate on. |
Definition at line 16 of file PolygonIterator.cpp.
|
private |
Finds the submap that fully contains the polygon and returns the parameters.
[in] | polygon | the polygon to get the submap for. |
[out] | startIndex | the start index of the submap. |
[out] | bufferSize | the buffer size of the submap. |
Definition at line 77 of file PolygonIterator.cpp.
|
private |
Check if current index is inside polygon.
Definition at line 70 of file PolygonIterator.cpp.
bool grid_map::PolygonIterator::isPastEnd | ( | ) | const |
Indicates if iterator is past end.
Definition at line 65 of file PolygonIterator.cpp.
bool grid_map::PolygonIterator::operator!= | ( | const PolygonIterator & | other | ) | const |
Compare to another iterator.
Definition at line 43 of file PolygonIterator.cpp.
const Index & grid_map::PolygonIterator::operator* | ( | ) | const |
Dereference the iterator with const.
Definition at line 48 of file PolygonIterator.cpp.
PolygonIterator & grid_map::PolygonIterator::operator++ | ( | ) |
Increase the iterator to the next element.
Definition at line 53 of file PolygonIterator.cpp.
PolygonIterator & grid_map::PolygonIterator::operator= | ( | const PolygonIterator & | other | ) |
Assignment operator.
iterator | the iterator to copy data from. |
Definition at line 31 of file PolygonIterator.cpp.
|
private |
Definition at line 90 of file PolygonIterator.hpp.
|
private |
Definition at line 91 of file PolygonIterator.hpp.
|
private |
Grid submap iterator.
Definition at line 84 of file PolygonIterator.hpp.
|
private |
Map information needed to get position from iterator.
Definition at line 87 of file PolygonIterator.hpp.
|
private |
Definition at line 88 of file PolygonIterator.hpp.
|
private |
Polygon to iterate on.
Definition at line 81 of file PolygonIterator.hpp.
|
private |
Definition at line 89 of file PolygonIterator.hpp.