Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
BIAS::Bresenham Class Reference

Scans a line using Bresenhams integer arithmetic algorithm. More...

#include <Base/ImageUtils/Bresenham.hh>

+ Inheritance diagram for BIAS::Bresenham:

Public Member Functions

 Bresenham ()
 
 Bresenham (const int start[2], const int end[2])
 
 Bresenham (const unsigned int start[2], const unsigned int end[2])
 
 Bresenham (const double start[2], const double end[2])
 
bool GetNext (int next[2])
 
bool GetNext (unsigned int next[2])
 
bool GetNext (double next[2])
 
void Init (const int start[2], const int end[2])
 
void Init (const unsigned int start[2], const unsigned int end[2])
 
void Init (const double start[2], const double end[2])
 
 ~Bresenham ()
 

Protected Attributes

bool _bInitialized
 
double _dDx
 
double _dDy
 
enum TLineType _eLineType
 
int _iDx
 
int _iDy
 
int _iEnd [2]
 
long int _iEps
 
int _iStart [2]
 
EightWaySymmetry< int > _iSym
 
int _iTransformedCurrent [2]
 
int _iTransformedEnd [2]
 
int _iTransformedStart [2]
 

Detailed Description

Scans a line using Bresenhams integer arithmetic algorithm.

Either Init() or the according constructor have to be called befor GetNext().

Author
Felix Woelk
Examples:
ExampleBresenham.cpp.

Definition at line 42 of file Bresenham.hh.

Constructor & Destructor Documentation

BIAS::Bresenham::Bresenham ( )
inline

Definition at line 91 of file Bresenham.hh.

References _bInitialized.

BIAS::Bresenham::Bresenham ( const int  start[2],
const int  end[2] 
)
inline

Definition at line 101 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::Bresenham ( const unsigned int  start[2],
const unsigned int  end[2] 
)
inline

Definition at line 109 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::Bresenham ( const double  start[2],
const double  end[2] 
)
inline

Definition at line 117 of file Bresenham.hh.

References _bInitialized, and Init().

BIAS::Bresenham::~Bresenham ( )
inline

Definition at line 98 of file Bresenham.hh.

Member Function Documentation

bool BIAS::Bresenham::GetNext ( int  next[2])
inline
bool BIAS::Bresenham::GetNext ( unsigned int  next[2])
inline

Definition at line 63 of file Bresenham.hh.

References GetNext().

bool BIAS::Bresenham::GetNext ( double  next[2])
inline

Definition at line 213 of file Bresenham.hh.

References _dDx, _dDy, and GetNext().

void BIAS::Bresenham::Init ( const int  start[2],
const int  end[2] 
)
inline
void BIAS::Bresenham::Init ( const unsigned int  start[2],
const unsigned int  end[2] 
)
inline

Definition at line 56 of file Bresenham.hh.

References Init().

void BIAS::Bresenham::Init ( const double  start[2],
const double  end[2] 
)
inline

Member Data Documentation

bool BIAS::Bresenham::_bInitialized
protected

Definition at line 84 of file Bresenham.hh.

Referenced by Bresenham(), GetNext(), BIAS::Scanline::GetNext(), and Init().

double BIAS::Bresenham::_dDx
protected

Definition at line 80 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

double BIAS::Bresenham::_dDy
protected

Definition at line 81 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

enum TLineType BIAS::Bresenham::_eLineType
protected

Definition at line 71 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iDx
protected

Definition at line 78 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iDy
protected

Definition at line 79 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iEnd[2]
protected

Definition at line 74 of file Bresenham.hh.

Referenced by Init().

long int BIAS::Bresenham::_iEps
protected

Definition at line 82 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iStart[2]
protected

Definition at line 73 of file Bresenham.hh.

Referenced by Init().

EightWaySymmetry<int> BIAS::Bresenham::_iSym
protected

Definition at line 69 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iTransformedCurrent[2]
protected

Definition at line 75 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), Init(), and BIAS::Scanline::Init().

int BIAS::Bresenham::_iTransformedEnd[2]
protected

Definition at line 77 of file Bresenham.hh.

Referenced by GetNext(), BIAS::Scanline::GetNext(), and Init().

int BIAS::Bresenham::_iTransformedStart[2]
protected

Definition at line 76 of file Bresenham.hh.

Referenced by Init(), and BIAS::Scanline::Init().


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