41 :
BaseIterator(info), center_x_(center_x), center_y_(center_y), distance_(0), start_index_(0, 0)
57 double radius_sq,
unsigned int distance,
unsigned int max_distance,
104 ++(*internal_iterator_);
std::unique_ptr< CircleOutline > internal_iterator_
nav_grid::Index start_index_
void gridToWorld(const NavGridInfo &info, int mx, int my, double &wx, double &wy)
void increment() override
Increase the iterator to the next element.
unsigned int max_distance_
Iterates over all of the valid indexes that lie within a circle from the center out.
Spiral(const nav_grid::NavGridInfo *info, double center_x, double center_y, double radius)
Public Constructor.
bool fieldsEqual(const Spiral &other) override
Additional check for whether fields of derived iterators are equal.
bool isInside(unsigned int x, unsigned int y) const
Check if the center of the given index is within the circle.
const nav_grid::NavGridInfo * info_
Spiral end() const override
Helper function for range-style iteration.
void loadRing()
Given a new distance value, loads the internal iterator. If there are no valid values in the internal...
Iterates over the valid indexes that lie on the outline of a circle.
Spiral & operator=(const Spiral &other)
Assignment Operator Required to ensure unique_ptr is set properly.
Spiral begin() const override
Helper function for range-style iteration Equivalent to the above constructor.