CL_BezierCurve3
Class for bezier curves
Overview
This class generates points on a Bezier curve from given control points
Class members
CL_BezierCurve(-
const CL_Vector *cp, int cs, int steps, bool stepping = true)
- virtual
~CL_BezierCurve()
- virtual int
get_steps()
- virtual int
get_cs()
- virtual bool
get_stepping()
- virtual float
get_length( -
int segment = -1)
- virtual void
set_steps( -
int steps)
- virtual void
set_stepping( -
bool stepping)
- virtual CL_Vector*
get_curve()
- virtual CL_Vector*
get_control_points()
- CL_Vector operator [](
-
int n)
Members with descriptions
CL_BezierCurve(-
const CL_Vector *cp, int cs, int steps, bool stepping = true)
Parameters: cp - an array of control points with size (4 * cs) cs - number of curve segments steps - number of points to generate stepping - whether steps is the number of points per segment or per curve.
Description:
Constructor
- virtual
~CL_BezierCurve() -
Description:
Destructor
- virtual int
get_steps() -
Description:
Returns the number of steps
Return value:
number of steps
- virtual int
get_cs() -
Description:
Returns the number of curve segments
Return value:
number of curve segments
- virtual bool
get_stepping() -
Description:
Returns whether steps is the number of points per segment or per curve.
Return value:
stepping
- virtual float
get_length( -
int segment = -1)
Parameters: segment - number of segment (-1 indicates whole curve)
Description:
Returns the lenght of a segment (or the curve)
Return value:
length of segment (or curve)
- virtual void
set_steps( -
int steps)
Parameters: steps - number of steps
Description:
Sets the number of steps
- virtual void
set_stepping( -
bool stepping)
Parameters: stepping - whether steps is the number of points per segment or per curve.
Description:
Sets the stepping
- virtual CL_Vector*
get_curve() -
Description:
Returns an array of cs * steps CL_Vectors -> the curve
Return value:
the curve (cs * steps CL_Vectors)
- virtual CL_Vector*
get_control_points() -
Description:
Returns the 4 * cs control points
Return value:
the 4 * cs control points
- CL_Vector operator [](
-
int n)
Parameters: n - the vector to return (counting starts at 0)
Description:
Returns the n-th vector of the curve (_doesn't_ return a reference)
Return value:
the n-th vector of the curve (_doesn't_ return a reference)