#include <brezenham.h>
Public Member Functions | |
Brezenham8 (TooN::Vector< 2 > dir) | |
ImageRef | sideways () |
ImageRef | step () |
Returns the next image co-ordinate along the line. | |
Private Attributes | |
ImageRef | my_sideways |
double | residual |
ImageRef | step1 |
ImageRef | step2 |
double | val1 |
double | val2 |
Class to implement the Bresenham line-drawing algorithm. This object does not draw directly into an image, it simply outputs the set of image co-ordinates that should be visited to draw a line in a certain direction. Pixels are generated in a 8-connected sense (i.e. diagonal steps are possible). See also Brezenham.
Definition at line 61 of file brezenham.h.
CVD::Brezenham8::Brezenham8 | ( | TooN::Vector< 2 > | dir | ) |
Construct a line-drawing object
dir | The (x,y) direction of the line |
ImageRef CVD::Brezenham8::sideways | ( | ) | [inline] |
Which compass position most orthogonal to the line's direction? At each pixel given by step() you are guaranteed to be able to walk in the direction given by sideways and not walk on the line.
Definition at line 74 of file brezenham.h.
ImageRef CVD::Brezenham8::step | ( | ) |
Returns the next image co-ordinate along the line.
ImageRef CVD::Brezenham8::my_sideways [private] |
Definition at line 82 of file brezenham.h.
double CVD::Brezenham8::residual [private] |
Definition at line 77 of file brezenham.h.
ImageRef CVD::Brezenham8::step1 [private] |
Definition at line 80 of file brezenham.h.
ImageRef CVD::Brezenham8::step2 [private] |
Definition at line 81 of file brezenham.h.
double CVD::Brezenham8::val1 [private] |
Definition at line 78 of file brezenham.h.
double CVD::Brezenham8::val2 [private] |
Definition at line 79 of file brezenham.h.