Bresenham's 2D line drawing as a range. More...
#include <bresenham.hpp>
Classes | |
class | iterator |
Bresenham's 2D line drawing iterator, one cell at a time. More... | |
Public Member Functions | |
auto | begin () const |
Returns an iterator pointing to the first point in the line. More... | |
auto | end () const |
Returns a sentinel as past-of-end iterator. More... | |
Line ()=default | |
Constructs point line. More... | |
Line (Vector2 p0, Vector2 p1, Variant variant) | |
Constructs a Bresenham's 2D line drawing. More... | |
Private Attributes | |
Vector2 | p0_ {} |
Vector2 | p1_ {} |
Variant | variant_ {} |
Friends | |
class | iterator |
Bresenham's 2D line drawing as a range.
Vector2 | 2D vector type. Must be default constructible, copy constructible, and implement Vector2d::x() and Vector2::y() methods returning both lvalues (for mutation) and rvalues. |
Integer | Integer scalar type. |
Definition at line 51 of file bresenham.hpp.
|
default |
Constructs point line.
|
inlineexplicit |
Constructs a Bresenham's 2D line drawing.
p0 | Line start point in 2D space. |
p1 | Line end point in 2D space. |
variant | Bresenham's algorithm variant to be used. |
Definition at line 215 of file bresenham.hpp.
|
inline |
Returns an iterator pointing to the first point in the line.
Definition at line 219 of file bresenham.hpp.
|
inline |
Returns a sentinel as past-of-end iterator.
Definition at line 222 of file bresenham.hpp.
|
friend |
Definition at line 225 of file bresenham.hpp.
|
private |
Definition at line 227 of file bresenham.hpp.
|
private |
Definition at line 228 of file bresenham.hpp.
|
private |
Definition at line 229 of file bresenham.hpp.