#include <OgreSimpleSpline.h>
Public Methods | |
SimpleSpline () | |
~SimpleSpline () | |
void | addPoint (const Vector3 &p) |
Adds a control point to the end of the spline. More... | |
const Vector3 & | getPoint (unsigned short index) const |
Gets the detail of one of the control points of the spline. More... | |
unsigned short | getNumPoints (void) const |
Gets the number of control points in the spline. More... | |
void | clear (void) |
Clears all the points in the spline. More... | |
void | updatePoint (unsigned short index, const Vector3 &value) |
Updates a single point in the spline. More... | |
Vector3 | interpolate (Real t) |
Returns an interpolated point based on a parametric value over the whole series. More... | |
Vector3 | interpolate (unsigned int fromIndex, Real t) |
Interpolates a single segment of the spline given a parametric value. More... | |
void | setAutoCalculate (bool autoCalc) |
Tells the spline whether it should automatically calculate tangents on demand as points are added. More... | |
void | recalcTangents (void) |
Recalculates the tangents associated with this spline. More... | |
Protected Attributes | |
bool | mAutoCalc |
std::vector< Vector3 > | mPoints |
std::vector< Vector3 > | mTangents |
Matrix4 | mCoeffs |
Matrix of coefficients. More... |
Catmull-Rom splines are a specialisation of the general Hermite spline. With a Hermite spline, you define the start and end point of the line, and 2 tangents, one at the start of the line and one at the end. The Catmull-Rom spline simplifies this by just asking you to define a series of points, and the tangents are created for you.
|
|
|
|
|
Adds a control point to the end of the spline.
|
|
Clears all the points in the spline.
|
|
Gets the number of control points in the spline.
|
|
Gets the detail of one of the control points of the spline.
|
|
Interpolates a single segment of the spline given a parametric value.
|
|
Returns an interpolated point based on a parametric value over the whole series.
|
|
Recalculates the tangents associated with this spline.
|
|
Tells the spline whether it should automatically calculate tangents on demand as points are added.
|
|
Updates a single point in the spline.
|
|
|
|
Matrix of coefficients.
|
|
|
|
|
Copyright © 2002 by The OGRE Team