Iterates over the valid indexes that lie on the outline of a circle.
More...
#include <circle_outline.h>
Iterates over the valid indexes that lie on the outline of a circle.
Definition at line 57 of file circle_outline.h.
◆ CircleOutline() [1/3]
nav_grid_iterators::CircleOutline::CircleOutline |
( |
const nav_grid::NavGridInfo * |
info, |
|
|
double |
center_x, |
|
|
double |
center_y, |
|
|
double |
radius |
|
) |
| |
Public Constructor.
- Parameters
-
info | NavGridInfo for the grid to iterate over |
center_x | Center of the circle (x coordinate) |
center_y | Center of the circle (y coordinate) |
radius | Size of the circle |
Definition at line 40 of file circle_outline.cpp.
◆ CircleOutline() [2/3]
nav_grid_iterators::CircleOutline::CircleOutline |
( |
const nav_grid::NavGridInfo * |
info, |
|
|
double |
center_x, |
|
|
double |
center_y, |
|
|
unsigned int |
radius |
|
) |
| |
Public Constructor with integer radius.
- Parameters
-
info | NavGridInfo for the grid to iterate over |
center_x | Center of the circle (x coordinate) |
center_y | Center of the circle (y coordinate) |
radius | Size of the circle |
Definition at line 45 of file circle_outline.cpp.
◆ CircleOutline() [3/3]
Protected constructor that takes in an arbitrary index and other internal parameters.
- Parameters
-
info | NavGridInfo for the grid to iterate over |
index | Initial index |
center_index_x | Index of the center of the circle (x coordinate) |
center_index_y | Index of the center of the circle (y coordinate) |
distance | The number of cells in the radius of the circle |
init | Whether the first cell has been visited or not |
start_index | The first valid index in the minimum row |
Definition at line 67 of file circle_outline.cpp.
◆ begin()
◆ end()
◆ fieldsEqual()
bool nav_grid_iterators::CircleOutline::fieldsEqual |
( |
const CircleOutline & |
other | ) |
|
|
overridevirtual |
◆ increment()
void nav_grid_iterators::CircleOutline::increment |
( |
| ) |
|
|
overridevirtual |
◆ isOnOutline()
bool nav_grid_iterators::CircleOutline::isOnOutline |
( |
int |
dx, |
|
|
int |
dy |
|
) |
| const |
|
protected |
Check if a cell with the given distance from the center of the circle is on the outline of the circle.
- Returns
- true if the distance to the cell when rounded to an integer is equal to the distance_
Definition at line 138 of file circle_outline.cpp.
◆ isValidIndex()
bool nav_grid_iterators::CircleOutline::isValidIndex |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
protected |
Check if arbitrary coordinates are within the grid.
- Returns
- true if inside grid, false otherwise.
Definition at line 133 of file circle_outline.cpp.
◆ center_index_x_
int nav_grid_iterators::CircleOutline::center_index_x_ |
|
protected |
◆ center_index_y_
int nav_grid_iterators::CircleOutline::center_index_y_ |
|
protected |
◆ distance_
unsigned int nav_grid_iterators::CircleOutline::distance_ |
|
protected |
◆ init_
bool nav_grid_iterators::CircleOutline::init_ |
|
protected |
◆ point_x_
int nav_grid_iterators::CircleOutline::point_x_ |
|
protected |
◆ point_y_
int nav_grid_iterators::CircleOutline::point_y_ |
|
protected |
◆ signed_height_
int nav_grid_iterators::CircleOutline::signed_height_ |
|
protected |
◆ signed_width_
int nav_grid_iterators::CircleOutline::signed_width_ |
|
protected |
◆ start_index_
The documentation for this class was generated from the following files: