#include <spiral_iterator.hpp>
Public Member Functions | |
double | getCurrentRadius () const |
bool | isPastEnd () const |
bool | operator!= (const SpiralIterator &other) const |
const Eigen::Array2i & | operator* () const |
SpiralIterator & | operator++ () |
SpiralIterator & | operator= (const SpiralIterator &other) |
SpiralIterator (const cost_map::CostMap &gridMap, const Eigen::Vector2d ¢er, const double radius) | |
Private Member Functions | |
void | generateRing () |
bool | isInside (const Index index) const |
int | signum (const int val) |
Private Attributes | |
Size | bufferSize_ |
Position | center_ |
Position of the circle center;. | |
unsigned int | distance_ |
Index | indexCenter_ |
Length | mapLength_ |
Map information needed to get position from iterator. | |
Position | mapPosition_ |
unsigned int | nRings_ |
Number of rings into the circle is divided. | |
std::vector< Index > | pointsRing_ |
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 with a spiral.
Definition at line 20 of file spiral_iterator.hpp.
cost_map::SpiralIterator::SpiralIterator | ( | const cost_map::CostMap & | gridMap, |
const Eigen::Vector2d & | 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 17 of file spiral_iterator.cpp.
void cost_map::SpiralIterator::generateRing | ( | ) | [private] |
Uses the current distance to get the points of a ring around the center.
Definition at line 80 of file spiral_iterator.cpp.
double cost_map::SpiralIterator::getCurrentRadius | ( | ) | const |
Gets the radius of current ring that is iterated through.
Definition at line 112 of file spiral_iterator.cpp.
bool cost_map::SpiralIterator::isInside | ( | const Index | index | ) | const [private] |
Check if index is inside the circle.
Definition at line 72 of file spiral_iterator.cpp.
bool cost_map::SpiralIterator::isPastEnd | ( | ) | const |
Indicates if iterator is past end.
Definition at line 67 of file spiral_iterator.cpp.
bool cost_map::SpiralIterator::operator!= | ( | const SpiralIterator & | other | ) | const |
Compare to another iterator.
Definition at line 50 of file spiral_iterator.cpp.
const Eigen::Array2i & cost_map::SpiralIterator::operator* | ( | ) | const |
Dereference the iterator with const.
Definition at line 55 of file spiral_iterator.cpp.
SpiralIterator & cost_map::SpiralIterator::operator++ | ( | ) |
Increase the iterator to the next element.
Definition at line 60 of file spiral_iterator.cpp.
SpiralIterator & cost_map::SpiralIterator::operator= | ( | const SpiralIterator & | other | ) |
Assignment operator.
iterator | the iterator to copy data from. |
Definition at line 34 of file spiral_iterator.cpp.
int cost_map::SpiralIterator::signum | ( | const int | val | ) | [inline, private] |
Definition at line 83 of file spiral_iterator.hpp.
Size cost_map::SpiralIterator::bufferSize_ [private] |
Definition at line 107 of file spiral_iterator.hpp.
Position cost_map::SpiralIterator::center_ [private] |
Position of the circle center;.
Definition at line 88 of file spiral_iterator.hpp.
unsigned int cost_map::SpiralIterator::distance_ [private] |
Definition at line 100 of file spiral_iterator.hpp.
Index cost_map::SpiralIterator::indexCenter_ [private] |
Definition at line 89 of file spiral_iterator.hpp.
Length cost_map::SpiralIterator::mapLength_ [private] |
Map information needed to get position from iterator.
Definition at line 104 of file spiral_iterator.hpp.
Definition at line 105 of file spiral_iterator.hpp.
unsigned int cost_map::SpiralIterator::nRings_ [private] |
Number of rings into the circle is divided.
Definition at line 99 of file spiral_iterator.hpp.
std::vector<Index> cost_map::SpiralIterator::pointsRing_ [private] |
Definition at line 101 of file spiral_iterator.hpp.
double cost_map::SpiralIterator::radius_ [private] |
Radius of the circle.
Definition at line 93 of file spiral_iterator.hpp.
double cost_map::SpiralIterator::radiusSquare_ [private] |
Square of the radius for efficiency.
Definition at line 96 of file spiral_iterator.hpp.
double cost_map::SpiralIterator::resolution_ [private] |
Definition at line 106 of file spiral_iterator.hpp.