41 :
BaseIterator(info), center_x_(center_x), center_y_(center_y), start_index_(0, 0)
54 unsigned int max_x_grid, max_y_grid;
66 if (!
isInside(min_x_, min_y_)) ++(*this);
78 double center_y,
double radius_sq,
unsigned int min_x,
unsigned int min_y,
unsigned int width,
125 ++(*internal_iterator_);
131 ++(*internal_iterator_);
CircleFill & operator=(const CircleFill &other)
Assignment Operator Required to ensure unique_ptr is set properly.
CircleFill(const nav_grid::NavGridInfo *info, double center_x, double center_y, double radius)
Public Constructor.
void gridToWorld(const NavGridInfo &info, int mx, int my, double &wx, double &wy)
nav_grid::Index start_index_
Iterates over all of the valid indexes that lie within a circle in row major order.
std::unique_ptr< SubGrid > internal_iterator_
const nav_grid::NavGridInfo * info_
bool isInside(unsigned int x, unsigned int y) const
Check if coordinates are inside the circle.
void increment() override
Increase the iterator to the next element.
Iterator for looping through every index within an aligned rectangular portion of the grid...
bool fieldsEqual(const CircleFill &other) override
Additional check for whether fields of derived iterators are equal.
CircleFill begin() const override
Helper function for range-style iteration Equivalent to the above constructor.
bool worldToGridBounded(const NavGridInfo &info, double wx, double wy, unsigned int &mx, unsigned int &my)
CircleFill end() const override
Helper function for range-style iteration.