Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Class Members

Curve Class Reference
[Scene Graph]

#include <lvt/Shape.h>

Inheritance diagram for Curve:

Inheritance graph
[legend]
List of all members.

Detailed Description

A Bezier curve.


Public Member Functions

void Clear ()
 Clears all control points from the curve.
 Curve (int segs=30, int order=4)
 Default constructor.
int GetNumControlPoints () const
 Returns the number of control points in the curve.
int GetNumSegments () const
 Returns the number of segments the curve will be subdivided into when being rendered.
int GetOrder () const
 Returns the order of the spline.
virtual void Render ()
 Draws the shape.
void SetNumSegments (int segs)
 Sets the number of segments in which to subdivide the curve.
void SetOrder (int order)
 Sets the order of the spline.
void AddControlPoint (const Vec &p)
 Adds a new control point to the curve.


Constructor & Destructor Documentation

Curve int  segs = 30,
int  order = 4
 

Default constructor.

Sets the the subdivision of the curve into 30 segments, and sets the order of the curve to 4 (for a cubic curve).


Member Function Documentation

void AddControlPoint const Vec p  )  [inline]
 

Adds a new control point to the curve.

void Clear  )  [inline]
 

Clears all control points from the curve.

int GetNumControlPoints  )  const [inline]
 

Returns the number of control points in the curve.

int GetNumSegments  )  const [inline]
 

Returns the number of segments the curve will be subdivided into when being rendered.

int GetOrder  )  const [inline]
 

Returns the order of the spline.

virtual void Render  )  [virtual]
 

Draws the shape.

Implements Shape.

void SetNumSegments int  segs  )  [inline]
 

Sets the number of segments in which to subdivide the curve.

The default is 30.

void SetOrder int  order  ) 
 

Sets the order of the spline.

The order of the curve is its degree + 1. The order is clamped to the range [0, GL_MAX_EVAL_ORDER].


Generated on Thu Feb 17 09:45:47 2005 for liblvt by  doxygen 1.4.1