Class Line::iterator
Defined in File bresenham.hpp
Nested Relationships
This class is a nested type of Template Class Bresenham2i::Line.
Nested Types
Class Documentation
-
class iterator
Bresenham’s 2D line drawing iterator, one cell at a time.
Public Types
-
using iterator_category = std::forward_iterator_tag
Iterator category tag.
-
using difference_type = std::ptrdiff_t
Iterator difference type (as required by ranges::view_).
-
using value_type = Vector2
Iterated value type.
-
using pointer = Vector2*
Pointer to iterated value type.
-
using reference = Vector2&
Reference to iterated value type.
Public Functions
-
iterator() = default
Default constructor.
-
inline explicit iterator(const Line *line)
Constructs a Bresenham’s 2D
line
iterator.
-
inline const Vector2 &operator*() const
Dereference operator overload (only const).
-
inline const Vector2 *operator->() const
Arrow operator overload (only const).
-
inline bool operator==(const iterator &other) const
Equality operator overload (as required by std::forward_iterator).
-
struct sentinel
Past-of-end iterator sentinel.
-
using iterator_category = std::forward_iterator_tag