libcvd
brezenham.h
1 #ifndef __BREZENHAM_H
2 #define __BREZENHAM_H
3 
4 #include <TooN/TooN.h>
5 #include <cvd/image_ref.h>
6 
7 namespace CVD
8 {
9 
17 class Brezenham
18 {
19  public:
22  Brezenham(TooN::Vector<2> dir);
23 
25  ImageRef step();
26 
27  private:
28  double residual;
29  double val1;
30  double val2;
31  ImageRef step1;
32  ImageRef step2;
33 };
34 
42 {
43  public:
46  Brezenham8(TooN::Vector<2> dir);
47 
49  ImageRef step();
50 
55  ImageRef sideways() { return my_sideways; }
56 
57  private:
58  double residual;
59  double val1;
60  double val2;
61  ImageRef step1;
62  ImageRef step2;
63  ImageRef my_sideways;
64 };
65 
66 }
67 
68 #endif
All classes and functions are within the CVD namespace.
Definition: argb.h:6
ImageRef sideways()
Which compass position most orthogonal to the line&#39;s direction? At each pixel given by step() you are...
Definition: brezenham.h:55
ImageRef step()
Returns the next image co-ordinate along the line.
Definition: brezenham.cc:64
Class to implement the Bresenham line-drawing algorithm.
Definition: brezenham.h:17
Class to implement the Bresenham line-drawing algorithm.
Definition: brezenham.h:41
Brezenham(TooN::Vector< 2 > dir)
Construct a line-drawing object.
Definition: brezenham.cc:9
Definition: image_ref.h:29