Loading...
Searching...
No Matches
etl::bresenham_line< T, TWork > Class Template Reference

`#include <bresenham_line.h>`

## Classes

class | const_iterator
| Const Iterator. More...

## Public Types

typedef etl::coordinate_2d< T > | value_type
| Standard container types.
typedef size_t | size_type
typedef ptrdiff_t | difference_type
typedef value_type & | reference
typedef const value_type & | const_reference
typedef value_type * | pointer
typedef const value_type * | const_pointer

## Public Member Functions

| bresenham_line ()
| Constructor.
| bresenham_line (etl::coordinate_2d< T > first_, etl::coordinate_2d< T > last_)
| bresenham_line (T first_x, T first_y, T last_x, T last_y)
void | reset (etl::coordinate_2d< T > first_, etl::coordinate_2d< T > last_)
void | reset (T first_x, T first_y, T last_x, T last_y)
const_iterator | begin ()
const_iterator | end () const
| Get a const_iterator to one past the last coordinate.
const_reference | front () const
| Get the first coordinate.
const_reference | back () const
| Get the last coordinate.
size_t | size () const
| Get the size of the series.

## Friends

bool | operator== (const bresenham_line &lhs, const bresenham_line &rhs)
| Equality operator.
bool | operator!= (const bresenham_line &lhs, const bresenham_line &rhs)
| Inequality operator.

## Detailed Description

template<typename T, typename TWork = int16_t>
class etl::bresenham_line< T, TWork >

A pseudo-container that generates points on a line, using Bresenham's line algorithm. T is the type for the etl::coordinate_2d value type. TWork is the internal working variable type. Default is int16_t.

## Constructor & Destructor Documentation

## bresenham_line() [1/2]

template<typename T, typename TWork = int16_t>

etl::bresenham_line< T, TWork >::bresenham_line | ( | etl::coordinate_2d< T > | first_,
|  | etl::coordinate_2d< T > | last_ )

inline

Constructor. Supplied first and last coordinates

## bresenham_line() [2/2]

template<typename T, typename TWork = int16_t>

etl::bresenham_line< T, TWork >::bresenham_line | ( | T | first_x,
|  | T | first_y,
|  | T | last_x,
|  | T | last_y )

inline

Constructor. Supplied first and last coordinates

## Member Function Documentation

## begin()

template<typename T, typename TWork = int16_t>

const_iterator etl::bresenham_line< T, TWork >::begin | ( |  | ) |

inline

Get a const_iterator to the first coordinate. Resets the Bresenham line.

## reset() [1/2]

template<typename T, typename TWork = int16_t>

void etl::bresenham_line< T, TWork >::reset | ( | etl::coordinate_2d< T > | first_,
|  | etl::coordinate_2d< T > | last_ )

inline

Resets the line. Supplied first and last coordinates

## reset() [2/2]

template<typename T, typename TWork = int16_t>

void etl::bresenham_line< T, TWork >::reset | ( | T | first_x,
|  | T | first_y,
|  | T | last_x,
|  | T | last_y )

inline

Resets the line. Supplied first and last coordinates

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

- include/etl/bresenham_line.h