43 bool include_last_index,
bool bresenham)
44 :
BaseIterator(info), x0_(x0), y0_(y0), x1_(x1), y1_(y1), include_last_index_(include_last_index),
45 bresenham_(bresenham), start_index_(0, 0), end_index_(0, 0)
117 double local_x0, local_y0, local_x1, local_y1;
nav_grid::Index start_index_
Line begin() const override
Helper function for range-style iteration Equivalent to the above constructor.
nav_grid::Index end_index_
std::unique_ptr< AbstractLineIterator > internal_iterator_
void increment() override
Increase the iterator to the next element.
Line end() const override
Helper function for range-style iteration.
const nav_grid::NavGridInfo * info_
Line Iterator using Bresenham's algorithm (no subpixel precision)
Line Iterator with Ray Tracing (subpixel accuracy)
Iterates over all of the valid indexes of a line.
bool fieldsEqual(const Line &other) override
Additional check for whether fields of derived iterators are equal.
void worldToGrid(const NavGridInfo &info, double wx, double wy, double &mx, double &my)
Line & operator=(const Line &other)
Assignment Operator Required to ensure unique_ptr is set properly.
Line(const nav_grid::NavGridInfo *info, double x0, double y0, double x1, double y1, bool include_last_index=true, bool bresenham=true)
Public Constructor.
bool inBounds(const nav_grid::SignedIndex &sindex)
Check if a SignedIndex is within the bounds of the NavGrid.