#include <lvt/Shape.h>
Inheritance diagram for 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. |
|
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). |
|
Adds a new control point to the curve.
|
|
Clears all control points from the curve.
|
|
Returns the number of control points in the curve.
|
|
Returns the number of segments the curve will be subdivided into when being rendered.
|
|
Returns the order of the spline.
|
|
Draws the shape.
Implements Shape. |
|
Sets the number of segments in which to subdivide the curve. The default is 30. |
|
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]. |