Classes | Public Types | Public Member Functions | Private Attributes | List of all members
beluga::Bresenham2i Class Reference

Bresenham's 2D line drawing algorithm, optimized for integer arithmetic. More...

#include <bresenham.hpp>

Classes

class  Line
 Bresenham's 2D line drawing as a range. More...
 

Public Types

enum  Variant : std::uint8_t { kStandard = 0, kModified }
 Bresenham's 2D line drawing algorithm variants. More...
 

Public Member Functions

 Bresenham2i () noexcept=default
 Constructs standard Bresenham 2D line drawing algorithm. More...
 
 Bresenham2i (Bresenham2i &&) noexcept=default
 Default move constructor. More...
 
 Bresenham2i (const Bresenham2i &) noexcept=default
 Default copy constructor. More...
 
 Bresenham2i (Variant variant) noexcept
 Constructs specific Bresenham 2D line drawing algorithm variant. More...
 
template<class Vector2i = Eigen::Vector2i>
auto operator() (Vector2i p0, Vector2i p1) const
 Computes 2D line from p0 to p1. More...
 
Bresenham2ioperator= (Bresenham2i &&) noexcept=default
 Default move assignment operator overload. More...
 
Bresenham2ioperator= (const Bresenham2i &) noexcept=default
 Default copy assignment operator overload. More...
 

Private Attributes

Variant variant_ {}
 

Detailed Description

Bresenham's 2D line drawing algorithm, optimized for integer arithmetic.

Definition at line 34 of file bresenham.hpp.

Member Enumeration Documentation

◆ Variant

enum beluga::Bresenham2i::Variant : std::uint8_t

Bresenham's 2D line drawing algorithm variants.

Enumerator
kStandard 

Standard Bresenham's algorithm.

kModified 

Modified, aka supercover, Bresenham's algorithm. See http://eugen.dedu.free.fr/projects/bresenham.

Definition at line 37 of file bresenham.hpp.

Constructor & Destructor Documentation

◆ Bresenham2i() [1/4]

beluga::Bresenham2i::Bresenham2i ( )
defaultnoexcept

Constructs standard Bresenham 2D line drawing algorithm.

◆ Bresenham2i() [2/4]

beluga::Bresenham2i::Bresenham2i ( const Bresenham2i )
defaultnoexcept

Default copy constructor.

◆ Bresenham2i() [3/4]

beluga::Bresenham2i::Bresenham2i ( Bresenham2i &&  )
defaultnoexcept

Default move constructor.

◆ Bresenham2i() [4/4]

beluga::Bresenham2i::Bresenham2i ( Variant  variant)
inlineexplicitnoexcept

Constructs specific Bresenham 2D line drawing algorithm variant.

Definition at line 248 of file bresenham.hpp.

Member Function Documentation

◆ operator()()

template<class Vector2i = Eigen::Vector2i>
auto beluga::Bresenham2i::operator() ( Vector2i  p0,
Vector2i  p1 
) const
inline

Computes 2D line from p0 to p1.

Template Parameters
Vector2iPoint in 2D integer space ie. ℤ × ℤ.
Parameters
p0Start point in 2D integer space.
p1End point in 2D integer space.
Returns
subtended bresenham2i::line.

Definition at line 258 of file bresenham.hpp.

◆ operator=() [1/2]

Bresenham2i& beluga::Bresenham2i::operator= ( Bresenham2i &&  )
defaultnoexcept

Default move assignment operator overload.

◆ operator=() [2/2]

Bresenham2i& beluga::Bresenham2i::operator= ( const Bresenham2i )
defaultnoexcept

Default copy assignment operator overload.

Member Data Documentation

◆ variant_

Variant beluga::Bresenham2i::variant_ {}
private

Definition at line 263 of file bresenham.hpp.


The documentation for this class was generated from the following file:


beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:54