NAME
CL_BezierCurve - Class for Bezier curves
DESCRIPTION
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)
SEE ALSO
All ClanLib API classes can be found in clanlib (3).
AUTHORS
Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.
The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).
See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.