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::BresenhamCircleEighth Class Reference

Just like BresenhamCircle but only computes 1/8 of the circle. More...

#include <Base/ImageUtils/BresenhamCircleEighth.hh>

Public Member Functions

 BresenhamCircleEighth ()
 Default constructor. More...
 
 BresenhamCircleEighth (int center[2], int radius)
 Constructor. More...
 
bool GetNext (int next[2])
 Returns the coordinate of the next point on the 1/8 circle. More...
 
void Init (int center[2], int radius)
 Initialises this BresenhamCircleEighth with new center and radius. More...
 
 ~BresenhamCircleEighth ()
 Destructor. More...
 

Protected Attributes

int center_ [2]
 
int current_ [2]
 
int d_
 
int deltaE_
 
int deltaSE_
 
bool initialized_
 
int radius_
 

Detailed Description

Just like BresenhamCircle but only computes 1/8 of the circle.

Author
Felix Woelk, clean-up + refactoring by Robert Wulff 02/2010
Examples:
ExampleBresenham.cpp.

Definition at line 38 of file BresenhamCircleEighth.hh.

Constructor & Destructor Documentation

BIAS::BresenhamCircleEighth::BresenhamCircleEighth ( )
inline

Default constructor.

You have to call Init() by yourself before calling GetNext().

Definition at line 46 of file BresenhamCircleEighth.hh.

BIAS::BresenhamCircleEighth::BresenhamCircleEighth ( int  center[2],
int  radius 
)
inline

Constructor.

Parameters
centerthe center for this BresenhamCircleEighth
radiusthe radius for this BresenhamCircleEighth

Definition at line 58 of file BresenhamCircleEighth.hh.

References Init().

BIAS::BresenhamCircleEighth::~BresenhamCircleEighth ( )
inline

Destructor.

Definition at line 66 of file BresenhamCircleEighth.hh.

Member Function Documentation

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

Returns the coordinate of the next point on the 1/8 circle.

Can be called in a while loop:

int nextCoords[2]; while (bresCircEighth.GetNext(nextCoords)){ // draw nextCoords in image }

Parameters
nextthe returned coordinate of the next point on the 1/8 circle
Returns
true if there are still points left on the 1/8 circle or false if the 1/8 circle is finished
Examples:
ExampleBresenham.cpp.

Definition at line 118 of file BresenhamCircleEighth.hh.

References center_, current_, d_, deltaE_, deltaSE_, and initialized_.

Referenced by BIAS::ImageDraw< StorageType >::CircleCenterFilled().

void BIAS::BresenhamCircleEighth::Init ( int  center[2],
int  radius 
)
inline

Initialises this BresenhamCircleEighth with new center and radius.

Parameters
centerthe new center for this BresenhamCircleEighth
radiusthe new radius for this BresenhamCircleEighth

Definition at line 79 of file BresenhamCircleEighth.hh.

References center_, current_, d_, deltaE_, deltaSE_, initialized_, and radius_.

Referenced by BresenhamCircleEighth(), and BIAS::ImageDraw< StorageType >::CircleCenterFilled().

Member Data Documentation

int BIAS::BresenhamCircleEighth::center_[2]
protected

Definition at line 153 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::current_[2]
protected

Definition at line 155 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::d_
protected

Definition at line 156 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::deltaE_
protected

Definition at line 157 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::deltaSE_
protected

Definition at line 158 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

bool BIAS::BresenhamCircleEighth::initialized_
protected

Definition at line 161 of file BresenhamCircleEighth.hh.

Referenced by GetNext(), and Init().

int BIAS::BresenhamCircleEighth::radius_
protected

Definition at line 154 of file BresenhamCircleEighth.hh.

Referenced by Init().


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