Iterates over all of the valid indexes that lie within an arbitrary polygon in row major order.
More...
#include <polygon_fill.h>
Iterates over all of the valid indexes that lie within an arbitrary polygon in row major order.
Definition at line 49 of file polygon_fill.h.
◆ PolygonFill() [1/3]
nav_grid_iterators::PolygonFill::PolygonFill |
( |
const nav_grid::NavGridInfo * |
info, |
|
|
nav_2d_msgs::Polygon2D |
polygon |
|
) |
| |
Public Constructor.
- Parameters
-
info | NavGridInfo for the grid to iterate over |
polygon | Polygon to iterate over |
Definition at line 42 of file polygon_fill.cpp.
◆ PolygonFill() [2/3]
nav_grid_iterators::PolygonFill::PolygonFill |
( |
const PolygonFill & |
other | ) |
|
Copy Constructor Required to ensure unique_ptr is set properly.
Definition at line 86 of file polygon_fill.cpp.
◆ PolygonFill() [3/3]
nav_grid_iterators::PolygonFill::PolygonFill |
( |
const nav_grid::NavGridInfo * |
info, |
|
|
const nav_grid::Index & |
index, |
|
|
nav_2d_msgs::Polygon2D |
polygon, |
|
|
unsigned int |
min_x, |
|
|
unsigned int |
min_y, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
const nav_grid::Index & |
start_index |
|
) |
| |
|
protected |
Protected constructor that takes in an arbitrary index and other internal parameters.
- Parameters
-
info | NavGridInfo for the grid to iterate over |
index | Initial index |
polygon | Polygon to iterate over |
min_x | Minimum valid index that is within the polygon (x coordinate) |
min_y | Minimum valid index that is within the polygon (y coordinate) |
width | Maximum number of valid indexes in a row of the polygon |
height | Maximum number of of valid indexes in a column of the polygon |
start_index | The first valid index in the minimum row |
Definition at line 92 of file polygon_fill.cpp.
◆ begin()
PolygonFill nav_grid_iterators::PolygonFill::begin |
( |
| ) |
const |
|
override |
◆ end()
PolygonFill nav_grid_iterators::PolygonFill::end |
( |
| ) |
const |
|
override |
◆ fieldsEqual()
bool nav_grid_iterators::PolygonFill::fieldsEqual |
( |
const PolygonFill & |
other | ) |
|
|
overridevirtual |
◆ increment()
void nav_grid_iterators::PolygonFill::increment |
( |
| ) |
|
|
overridevirtual |
◆ isInside()
bool nav_grid_iterators::PolygonFill::isInside |
( |
unsigned int |
x, |
|
|
unsigned int |
y |
|
) |
| const |
|
protected |
Check if given index is inside the polygon.
- Returns
- true if inside, false otherwise.
Definition at line 116 of file polygon_fill.cpp.
◆ operator=()
Assignment Operator Required to ensure unique_ptr is set properly.
Definition at line 102 of file polygon_fill.cpp.
◆ height_
unsigned int nav_grid_iterators::PolygonFill::height_ |
|
protected |
◆ internal_iterator_
std::unique_ptr<SubGrid> nav_grid_iterators::PolygonFill::internal_iterator_ |
|
protected |
◆ min_x_
unsigned int nav_grid_iterators::PolygonFill::min_x_ |
|
protected |
◆ min_y_
unsigned int nav_grid_iterators::PolygonFill::min_y_ |
|
protected |
◆ polygon_
nav_2d_msgs::Polygon2D nav_grid_iterators::PolygonFill::polygon_ |
|
protected |
◆ start_index_
◆ width_
unsigned int nav_grid_iterators::PolygonFill::width_ |
|
protected |
The documentation for this class was generated from the following files: