#include <PolygonIterator.hpp>
Iterator class to iterate through a polygonal area of the map.
Definition at line 22 of file PolygonIterator.hpp.
◆ PolygonIterator()
Constructor.
- Parameters
-
gridMap | the grid map to iterate on. |
polygon | the polygonal area to iterate on. |
Definition at line 16 of file PolygonIterator.cpp.
◆ findSubmapParameters()
void grid_map::PolygonIterator::findSubmapParameters |
( |
const grid_map::Polygon & |
polygon, |
|
|
Index & |
startIndex, |
|
|
Size & |
bufferSize |
|
) |
| const |
|
private |
Finds the submap that fully contains the polygon and returns the parameters.
- 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 71 of file PolygonIterator.cpp.
◆ isInside()
bool grid_map::PolygonIterator::isInside |
( |
| ) |
const |
|
private |
Check if current index is inside polygon.
- Returns
- true if inside, false otherwise.
Definition at line 64 of file PolygonIterator.cpp.
◆ isPastEnd()
bool grid_map::PolygonIterator::isPastEnd |
( |
| ) |
const |
Indicates if iterator is past end.
- Returns
- true if iterator is out of scope, false if end has not been reached.
Definition at line 59 of file PolygonIterator.cpp.
◆ operator!=()
bool grid_map::PolygonIterator::operator!= |
( |
const PolygonIterator & |
other | ) |
const |
Compare to another iterator.
- Returns
- whether the current iterator points to a different address than the other one.
Definition at line 33 of file PolygonIterator.cpp.
◆ operator*()
const Index & grid_map::PolygonIterator::operator* |
( |
| ) |
const |
Dereference the iterator with const.
- Returns
- the value to which the iterator is pointing.
Definition at line 38 of file PolygonIterator.cpp.
◆ operator++()
Increase the iterator to the next element.
- Returns
- a reference to the updated iterator.
Definition at line 43 of file PolygonIterator.cpp.
◆ bufferSize_
Size grid_map::PolygonIterator::bufferSize_ |
|
private |
◆ bufferStartIndex_
Index grid_map::PolygonIterator::bufferStartIndex_ |
|
private |
◆ internalIterator_
std::shared_ptr<SubmapIterator> grid_map::PolygonIterator::internalIterator_ |
|
private |
◆ mapLength_
Length grid_map::PolygonIterator::mapLength_ |
|
private |
◆ mapPosition_
Position grid_map::PolygonIterator::mapPosition_ |
|
private |
◆ polygon_
◆ resolution_
double grid_map::PolygonIterator::resolution_ |
|
private |
The documentation for this class was generated from the following files: