#include <circle_iterator.hpp>
Public Member Functions | |
CircleIterator (const CostMap &gridMap, const Position ¢er, const double radius) | |
bool | isPastEnd () const |
bool | operator!= (const CircleIterator &other) const |
const Index & | operator* () const |
CircleIterator & | operator++ () |
CircleIterator & | operator= (const CircleIterator &other) |
Private Member Functions | |
void | findSubmapParameters (const Position ¢er, const double radius, Index &startIndex, Size &bufferSize) const |
bool | isInside () const |
Private Attributes | |
Size | bufferSize_ |
Index | bufferStartIndex_ |
Position | center_ |
Position of the circle center;. | |
std::shared_ptr< SubmapIterator > | internalIterator_ |
Grid submap iterator. | |
Length | mapLength_ |
Map information needed to get position from iterator. | |
Position | mapPosition_ |
double | radius_ |
Radius of the circle. | |
double | radiusSquare_ |
Square of the radius for efficiency. | |
double | resolution_ |
Iterator class to iterate through a circular area of the map.
Definition at line 19 of file circle_iterator.hpp.
cost_map::CircleIterator::CircleIterator | ( | const CostMap & | gridMap, |
const Position & | center, | ||
const double | radius | ||
) |
Constructor.
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 circle_iterator.cpp.
void cost_map::CircleIterator::findSubmapParameters | ( | const Position & | center, |
const double | radius, | ||
Index & | startIndex, | ||
Size & | bufferSize | ||
) | const [private] |
Finds the submap that fully contains the circle and returns the 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 82 of file circle_iterator.cpp.
bool cost_map::CircleIterator::isInside | ( | ) | const [private] |
Check if current index is inside the circle.
Definition at line 74 of file circle_iterator.cpp.
bool cost_map::CircleIterator::isPastEnd | ( | ) | const |
Indicates if iterator is past end.
Definition at line 69 of file circle_iterator.cpp.
bool cost_map::CircleIterator::operator!= | ( | const CircleIterator & | other | ) | const |
Compare to another iterator.
Definition at line 47 of file circle_iterator.cpp.
const Index & cost_map::CircleIterator::operator* | ( | ) | const |
Dereference the iterator with const.
Definition at line 52 of file circle_iterator.cpp.
CircleIterator & cost_map::CircleIterator::operator++ | ( | ) |
Increase the iterator to the next element.
Definition at line 57 of file circle_iterator.cpp.
CircleIterator & cost_map::CircleIterator::operator= | ( | const CircleIterator & | other | ) |
Assignment operator.
iterator | the iterator to copy data from. |
Definition at line 33 of file circle_iterator.cpp.
Size cost_map::CircleIterator::bufferSize_ [private] |
Definition at line 96 of file circle_iterator.hpp.
Definition at line 97 of file circle_iterator.hpp.
Position cost_map::CircleIterator::center_ [private] |
Position of the circle center;.
Definition at line 81 of file circle_iterator.hpp.
std::shared_ptr<SubmapIterator> cost_map::CircleIterator::internalIterator_ [private] |
Grid submap iterator.
Definition at line 90 of file circle_iterator.hpp.
Length cost_map::CircleIterator::mapLength_ [private] |
Map information needed to get position from iterator.
Definition at line 93 of file circle_iterator.hpp.
Definition at line 94 of file circle_iterator.hpp.
double cost_map::CircleIterator::radius_ [private] |
Radius of the circle.
Definition at line 84 of file circle_iterator.hpp.
double cost_map::CircleIterator::radiusSquare_ [private] |
Square of the radius for efficiency.
Definition at line 87 of file circle_iterator.hpp.
double cost_map::CircleIterator::resolution_ [private] |
Definition at line 95 of file circle_iterator.hpp.