42 :
BaseIterator(info), polygon_(polygon), start_index_(0, 0), bresenham_(bresenham), side_index_(0)
44 if (polygon.points.size() == 0)
62 nav_2d_msgs::Polygon2D polygon,
bool bresenham,
unsigned int side_index)
85 if (next_index ==
polygon_.points.size())
115 ++(*internal_iterator_);
nav_grid::Index start_index_
std::unique_ptr< Line > internal_iterator_
bool equals(const nav_2d_msgs::Polygon2D &polygon0, const nav_2d_msgs::Polygon2D &polygon1)
void loadSide()
Given a new side index, loads the internal iterator. If there are no valid values in the internal ite...
Iterates over all of the valid indexes on the outline of a polygon.
bool fieldsEqual(const PolygonOutline &other) override
Additional check for whether fields of derived iterators are equal.
const nav_grid::NavGridInfo * info_
PolygonOutline(const nav_grid::NavGridInfo *info, nav_2d_msgs::Polygon2D polygon, bool bresenham=true)
Public Constructor.
Iterates over all of the valid indexes of a line.
nav_2d_msgs::Polygon2D polygon_
void increment() override
Increase the iterator to the next element.
PolygonOutline begin() const override
Helper function for range-style iteration Equivalent to the above constructor.
PolygonOutline & operator=(const PolygonOutline &other)
Assignment Operator Required to ensure unique_ptr is set properly.
PolygonOutline end() const override
Helper function for range-style iteration.