#include <CircleIterator.hpp>
Iterator class to iterate through a circular area of the map.
Definition at line 23 of file CircleIterator.hpp.
◆ CircleIterator()
grid_map::CircleIterator::CircleIterator |
( |
const GridMap & |
gridMap, |
|
|
const Position & |
center, |
|
|
double |
radius |
|
) |
| |
Constructor.
- Parameters
-
gridMap | the grid map to iterate on. |
center | the position of the circle center. |
radius | the radius of the circle. |
Definition at line 16 of file CircleIterator.cpp.
◆ findSubmapParameters()
void grid_map::CircleIterator::findSubmapParameters |
( |
const Position & |
center, |
|
|
double |
radius, |
|
|
Index & |
startIndex, |
|
|
Size & |
bufferSize |
|
) |
| const |
|
private |
Finds the submap that fully contains the circle and returns the parameters.
- Parameters
-
[in] | center | the position of the circle center. |
[in] | radius | the radius of the circle. |
[out] | startIndex | the start index of the submap. |
[out] | bufferSize | the buffer size of the submap. |
Definition at line 74 of file CircleIterator.cpp.
◆ isInside()
bool grid_map::CircleIterator::isInside |
( |
| ) |
const |
|
private |
Check if current index is inside the circle.
- Returns
- true if inside, false otherwise.
Definition at line 66 of file CircleIterator.cpp.
◆ isPastEnd()
bool grid_map::CircleIterator::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 61 of file CircleIterator.cpp.
◆ operator!=()
bool grid_map::CircleIterator::operator!= |
( |
const CircleIterator & |
other | ) |
const |
Compare to another iterator.
- Returns
- whether the current iterator points to a different address than the other one.
Definition at line 35 of file CircleIterator.cpp.
◆ operator*()
const Index & grid_map::CircleIterator::operator* |
( |
| ) |
const |
Dereference the iterator with const.
- Returns
- the value to which the iterator is pointing.
Definition at line 40 of file CircleIterator.cpp.
◆ operator++()
Increase the iterator to the next element.
- Returns
- a reference to the updated iterator.
Definition at line 45 of file CircleIterator.cpp.
◆ bufferSize_
Size grid_map::CircleIterator::bufferSize_ |
|
private |
◆ bufferStartIndex_
Index grid_map::CircleIterator::bufferStartIndex_ |
|
private |
◆ center_
Position grid_map::CircleIterator::center_ |
|
private |
◆ internalIterator_
std::shared_ptr<SubmapIterator> grid_map::CircleIterator::internalIterator_ |
|
private |
Grid submap iterator. // TODO Think of using unique_ptr instead.
Definition at line 87 of file CircleIterator.hpp.
◆ mapLength_
Length grid_map::CircleIterator::mapLength_ |
|
private |
Map information needed to get position from iterator.
Definition at line 90 of file CircleIterator.hpp.
◆ mapPosition_
Position grid_map::CircleIterator::mapPosition_ |
|
private |
◆ radius_
double grid_map::CircleIterator::radius_ |
|
private |
◆ radiusSquare_
double grid_map::CircleIterator::radiusSquare_ |
|
private |
◆ resolution_
double grid_map::CircleIterator::resolution_ |
|
private |
The documentation for this class was generated from the following files: