#include <OgreRotationalSpline.h>
Public Methods | |
RotationalSpline () | |
~RotationalSpline () | |
void | addPoint (const Quaternion &p) |
Adds a control point to the end of the spline. More... | |
const Quaternion & | 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 Quaternion &value) |
Updates a single point in the spline. More... | |
Quaternion | interpolate (Real t) |
Returns an interpolated point based on a parametric value over the whole series. More... | |
Quaternion | 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< Quaternion > | mPoints |
std::vector< Quaternion > | mTangents |
In positional splines, we use the points and tangents on those points to generate control points for the spline. In this case, we use quaternions and derivatives of the quaternions (i.e. the rate and direction of change at each point). This is the same as SimpleSpline since a tangent is a derivative of a position. We effectively generate an extra quaternion in between each actual quaternion which when take with the original quaternion forms the 'tangent' of that quaternion.
|
|
|
|
|
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.
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team