Go to the documentation of this file.
35 #ifndef NAV_GRID_ITERATORS_POLYGON_FILL_H
36 #define NAV_GRID_ITERATORS_POLYGON_FILL_H
40 #include <nav_2d_msgs/Polygon2D.h>
92 unsigned int min_x,
unsigned int min_y,
unsigned int width,
unsigned int height,
100 bool isInside(
unsigned int x,
unsigned int y)
const;
109 #endif // NAV_GRID_ITERATORS_POLYGON_FILL_H
PolygonFill begin() const override
Iterates over all of the valid indexes that lie within an arbitrary polygon in row major order.
nav_2d_msgs::Polygon2D polygon_
std::unique_ptr< SubGrid > internal_iterator_
nav_grid::Index start_index_
PolygonFill & operator=(const PolygonFill &other)
Assignment Operator Required to ensure unique_ptr is set properly.
PolygonFill(const nav_grid::NavGridInfo *info, nav_2d_msgs::Polygon2D polygon)
Public Constructor.
void increment() override
Increase the iterator to the next element.
bool fieldsEqual(const PolygonFill &other) override
Additional check for whether fields of derived iterators are equal.
bool isInside(unsigned int x, unsigned int y) const
Check if given index is inside the polygon.
PolygonFill end() const override