Go to the documentation of this file.
41 :
BaseIterator(info), center_x_(center_x), center_y_(center_y), distance_(0), start_index_(0, 0)
51 :
Spiral(other.info_, other.index_, other.center_x_, other.center_y_, other.radius_sq_,
52 other.distance_, other.max_distance_, other.start_index_)
57 double radius_sq,
unsigned int distance,
unsigned int max_distance,
59 :
BaseIterator(info, index), center_x_(center_x), center_y_(center_y), radius_sq_(radius_sq),
60 distance_(distance), max_distance_(max_distance), start_index_(start_index)
104 ++(*internal_iterator_);
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.
void increment() override
Increase the iterator to the next element.
void gridToWorld(const NavGridInfo &info, int mx, int my, double &wx, double &wy)
std::unique_ptr< CircleOutline > internal_iterator_
Spiral & operator=(const Spiral &other)
Assignment Operator Required to ensure unique_ptr is set properly.
nav_grid::Index start_index_
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 begin() const override
Spiral end() const override
bool fieldsEqual(const Spiral &other) override
Additional check for whether fields of derived iterators are equal.
unsigned int max_distance_
Iterates over the valid indexes that lie on the outline of a circle.
void loadRing()
Given a new distance value, loads the internal iterator. If there are no valid values in the internal...