last update 20 Sep 2009 |
#include <cvrBresenhamLine.h>
Classes | |
class | parameters |
The parameters for the class bresenhamLine. More... | |
Public Member Functions | |
bresenhamLine () | |
bresenhamLine (const parameters &par) | |
bresenhamLine (const bresenhamLine &other) | |
virtual | ~bresenhamLine () |
template<typename T > | |
bool | apply (const int fx, const int fy, const int tx, const int ty, genericMatrix< T > &m, T color) const |
bool | apply (const int fx, const int fy, const int tx, const int ty, ipointList &l) const |
template<typename T > | |
bool | apply (const ipoint &from, const ipoint &to, genericMatrix< T > &m, T color) const |
bool | apply (const ipoint &from, const ipoint &to, ipointList &l) const |
bresenhamLine & | copy (const bresenhamLine &other) |
bresenhamLine & | operator= (const bresenhamLine &other) |
virtual const std::string & | name () const |
virtual bresenhamLine * | clone () const |
virtual bresenhamLine * | newInstance () const |
const parameters & | getParameters () const |
The apply methods take the first and last points of the line 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.
cvr::bresenhamLine::bresenhamLine | ( | ) |
Default constructor.
cvr::bresenhamLine::bresenhamLine | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::bresenhamLine::bresenhamLine | ( | const bresenhamLine & | other | ) |
virtual cvr::bresenhamLine::~bresenhamLine | ( | ) | [virtual] |
Destructor.
bool cvr::bresenhamLine::apply | ( | const ipoint & | from, | |
const ipoint & | to, | |||
ipointList & | l | |||
) | const [inline] |
bool cvr::bresenhamLine::apply | ( | const ipoint & | from, | |
const ipoint & | to, | |||
genericMatrix< T > & | m, | |||
T | color | |||
) | const [inline] |
Render a line from the point f to point t.
The line will be drawn to the given genericMatrix<T> instance, using the given color.
bool cvr::bresenhamLine::apply | ( | const int | fx, | |
const int | fy, | |||
const int | tx, | |||
const int | ty, | |||
ipointList & | l | |||
) | const [inline] |
bool cvr::bresenhamLine::apply | ( | const int | fx, | |
const int | fy, | |||
const int | tx, | |||
const int | ty, | |||
genericMatrix< T > & | m, | |||
T | color | |||
) | const [inline] |
Render a line from the point (fx,fy) to point (tx,ty).
The line will be drawn to the given genericMatrix<T> instance, using the given color.
virtual bresenhamLine* cvr::bresenhamLine::clone | ( | ) | const [virtual] |
bresenhamLine& cvr::bresenhamLine::copy | ( | const bresenhamLine & | other | ) |
const parameters& cvr::bresenhamLine::getParameters | ( | ) | const |
virtual const std::string& cvr::bresenhamLine::name | ( | ) | const [virtual] |
virtual bresenhamLine* cvr::bresenhamLine::newInstance | ( | ) | const [virtual] |
bresenhamLine& cvr::bresenhamLine::operator= | ( | const bresenhamLine & | other | ) |