CVR-Lib last update 20 Sep 2009

cvr::bresenhamCircle Class Reference

Functor for rendering circle segments with the Bresenham circle drawing algorithm. More...

#include <cvrBresenhamCircle.h>

Inheritance diagram for cvr::bresenhamCircle:

Inheritance graph
[legend]
Collaboration diagram for cvr::bresenhamCircle:

Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class bresenhamCircle. More...

Public Member Functions

 bresenhamCircle ()
 bresenhamCircle (const parameters &par)
 bresenhamCircle (const bresenhamCircle &other)
virtual ~bresenhamCircle ()
template<typename T >
bool apply (const int cx, const int cy, const int radius, genericMatrix< T > &m, T color) const
bool apply (const int cx, const int cy, const int radius, ipointList &l) const
template<typename T >
bool apply (const ipoint &center, const int radius, genericMatrix< T > &m, T color) const
bool apply (const ipoint &center, const int radius, ipointList &l) const
bool apply (const int radius, lattice1D< int > &ioPts) const
bresenhamCirclecopy (const bresenhamCircle &other)
bresenhamCircleoperator= (const bresenhamCircle &other)
virtual const std::string & name () const
virtual bresenhamCircleclone () const
virtual bresenhamCirclenewInstance () const
const parametersgetParameters () const


Detailed Description

Functor for rendering circle segments with the Bresenham circle drawing algorithm.

The apply methods take the first and last points of the circle segment, and an object where to store the points. Currently two types of point stores are supported:

Additional point stores may be added, see the addPoint() method.


Constructor & Destructor Documentation

cvr::bresenhamCircle::bresenhamCircle (  ) 

Default constructor.

cvr::bresenhamCircle::bresenhamCircle ( const parameters par  ) 

Construct a functor using the given parameters.

cvr::bresenhamCircle::bresenhamCircle ( const bresenhamCircle other  ) 

Copy constructor.

Parameters:
other the object to be copied

virtual cvr::bresenhamCircle::~bresenhamCircle (  )  [virtual]

Destructor.


Member Function Documentation

bool cvr::bresenhamCircle::apply ( const int  radius,
lattice1D< int > &  ioPts 
) const [inline]

Render a circle with radius radius.

The outmost x-coordinates of each y-coordinate will be added to the given lattice1D ioPts. This lattice1D can then be used as io points for sampling a circle area.

Parameters:
radius radius of the circle
ioPts lattice1D containing io coordinates

bool cvr::bresenhamCircle::apply ( const ipoint center,
const int  radius,
ipointList l 
) const [inline]

Render a circle with center center and radius radius.

The point will be added to the given pointlist l.

Parameters:
center center of the circle
radius radius of the circle
l pointlist the points are added to

template<typename T >
bool cvr::bresenhamCircle::apply ( const ipoint center,
const int  radius,
genericMatrix< T > &  m,
color 
) const [inline]

Render a circle with center center and radius radius.

The circle will be drawn to the given genericMatrix<T> instance, using the given color.

Parameters:
center center of the circle
radius radius of the circle
m matrix the circle is drawn into
color color the circle is drawn in

bool cvr::bresenhamCircle::apply ( const int  cx,
const int  cy,
const int  radius,
ipointList l 
) const [inline]

Render a circle with center (cx,cy) and radius radius.

The point will be added to the given pointlist l.

Parameters:
cx x-coord of center
cy y-coord of center
radius radius of the circle
l pointlist the points are added to

template<typename T >
bool cvr::bresenhamCircle::apply ( const int  cx,
const int  cy,
const int  radius,
genericMatrix< T > &  m,
color 
) const [inline]

Render a circle with center (cx,cy) and radius radius.

The circle will be drawn to the given genericMatrix<T> instance, using the given color.

Parameters:
cx x-coord of center
cy y-coord of center
radius radius of the circle
m matrix the circle is drawn into
color color the circle is drawn in

virtual bresenhamCircle* cvr::bresenhamCircle::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements cvr::functor.

bresenhamCircle& cvr::bresenhamCircle::copy ( const bresenhamCircle other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

const parameters& cvr::bresenhamCircle::getParameters (  )  const

Returns used parameters.

Reimplemented from cvr::parametersManager.

virtual const std::string& cvr::bresenhamCircle::name (  )  const [virtual]

Returns the complete name of the functor class.

Implements cvr::functor.

virtual bresenhamCircle* cvr::bresenhamCircle::newInstance (  )  const [virtual]

Returns a pointer to a new instance of this functor.

Implements cvr::functor.

bresenhamCircle& cvr::bresenhamCircle::operator= ( const bresenhamCircle other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object


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

Generated on Sun Sep 20 22:08:41 2009 for CVR-Lib by Doxygen 1.5.8