43 include_last_index_(include_last_index)
45 int dx = std::abs(
x1_ -
x0_);
46 int dy = std::abs(
y1_ -
y0_);
47 int xsign =
x1_ >=
x0_ ? 1 : -1;
48 int ysign =
y1_ >=
y0_ ? 1 : -1;
75 int x0,
int y0,
int x1,
int y1,
bool include_last_index,
76 int error_inc_x,
int loop_inc_x,
int error_inc_y,
int loop_inc_y,
77 int denominator,
int numerator,
int numerator_inc)
Bresenham(int x0, int y0, int x1, int y1, bool include_last_index=true)
Public constructor.
Abstract class for iterating over lines.
Bresenham end() const
Helper function for range-style iteration.
void increment() override
Increase the iterator to the next element.
Line Iterator using Bresenham's algorithm (no subpixel precision)
nav_grid::SignedIndex getFinalIndex() const override
nav_grid::SignedIndex index_
GenericIndex< int > SignedIndex
Bresenham begin() const
Helper function for range-style iteration.