Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CL_BezierCurve Class Reference

clanCore="Math". More...

#include <bezier.h>

Collaboration diagram for CL_BezierCurve:

Collaboration graph
[legend]
List of all members.

Public Methods

 CL_BezierCurve (const CL_Vector *cp, int cs, int steps, bool stepping=true)
virtual ~CL_BezierCurve ()
 param: cp - an array of control points with size (4 * cs)param: cs - number of curve segmentsparam: steps - number of points to generateparam: stepping - whether steps is the number of points per segment or per curve.

virtual int get_steps () const
virtual int get_cs () const
 retval: number of steps.

virtual bool get_stepping () const
 retval: number of curve segments.

virtual float get_length (int segment=-1) const
 retval: stepping.

virtual void set_steps (int steps)
 param: segment - number of segment (-1 indicates whole curve)retval: length of segment (or curve).

virtual void set_stepping (bool stepping)
 param: steps - number of steps.

virtual CL_Vectorget_curve () const
 param: stepping - whether steps is the number of points per segment or per curve.

virtual CL_Vectorget_control_points () const
 retval: the curve (cs * steps CL_Vectors).

CL_Vector operator[] (int n)
 retval: the 4 * cs control points.


Protected Methods

virtual void make_curve ()

Protected Attributes

CL_Vectorcurve
CL_Vectorcp
int steps
int cs
bool stepping

Detailed Description

clanCore="Math".

Definition at line 43 of file bezier.h.


Constructor & Destructor Documentation

CL_BezierCurve::CL_BezierCurve ( const CL_Vector * cp,
int cs,
int steps,
bool stepping = true )
 

CL_BezierCurve::~CL_BezierCurve ( ) [virtual]
 

param: cp - an array of control points with size (4 * cs)param: cs - number of curve segmentsparam: steps - number of points to generateparam: stepping - whether steps is the number of points per segment or per curve.


Member Function Documentation

CL_Vector * CL_BezierCurve::get_control_points ( ) const [inline, virtual]
 

retval: the curve (cs * steps CL_Vectors).

Definition at line 96 of file bezier.h.

int CL_BezierCurve::get_cs ( ) const [inline, virtual]
 

retval: number of steps.

Definition at line 71 of file bezier.h.

CL_Vector * CL_BezierCurve::get_curve ( ) const [inline, virtual]
 

param: stepping - whether steps is the number of points per segment or per curve.

Definition at line 92 of file bezier.h.

float CL_BezierCurve::get_length ( int segment = -1 ) const [virtual]
 

retval: stepping.

bool CL_BezierCurve::get_stepping ( ) const [inline, virtual]
 

retval: number of curve segments.

Definition at line 75 of file bezier.h.

int CL_BezierCurve::get_steps ( ) const [inline, virtual]
 

Definition at line 67 of file bezier.h.

virtual void CL_BezierCurve::make_curve ( ) [protected, virtual]
 

CL_Vector CL_BezierCurve::operator[] ( int n ) [inline]
 

retval: the 4 * cs control points.

Definition at line 100 of file bezier.h.

void CL_BezierCurve::set_stepping ( bool stepping ) [virtual]
 

param: steps - number of steps.

void CL_BezierCurve::set_steps ( int steps ) [virtual]
 

param: segment - number of segment (-1 indicates whole curve)retval: length of segment (or curve).


Member Data Documentation

CL_Vector* CL_BezierCurve::cp [protected]
 

Definition at line 49 of file bezier.h.

int CL_BezierCurve::cs [protected]
 

Definition at line 51 of file bezier.h.

CL_Vector* CL_BezierCurve::curve [protected]
 

Definition at line 48 of file bezier.h.

bool CL_BezierCurve::stepping [protected]
 

Definition at line 52 of file bezier.h.

int CL_BezierCurve::steps [protected]
 

Definition at line 51 of file bezier.h.


The documentation for this class was generated from the following file:
Generated at Wed Apr 4 19:56:37 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001