35 #ifndef NAV_GRID_ITERATORS_SPIRAL_H 36 #define NAV_GRID_ITERATORS_SPIRAL_H 93 double radius_sq,
unsigned int distance,
unsigned int max_distance,
106 bool isInside(
unsigned int x,
unsigned int y)
const;
116 #endif // NAV_GRID_ITERATORS_SPIRAL_H std::unique_ptr< CircleOutline > internal_iterator_
nav_grid::Index start_index_
TFSIMD_FORCE_INLINE tfScalar distance(const Vector3 &v) const
void increment() override
Increase the iterator to the next element.
TFSIMD_FORCE_INLINE const tfScalar & y() const
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.
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...
TFSIMD_FORCE_INLINE const tfScalar & x() const
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.