#include <OgreSimpleSpline.h>
Collaboration diagram for Ogre::SimpleSpline:
Public Methods | |
SimpleSpline () | |
~SimpleSpline () | |
void | addPoint (const Vector3 &p) |
Adds a control point to the end of the spline. | |
const Vector3 & | getPoint (unsigned short index) const |
Gets the detail of one of the control points of the spline. | |
unsigned short | getNumPoints (void) const |
Gets the number of control points in the spline. | |
void | clear (void) |
Clears all the points in the spline. | |
void | updatePoint (unsigned short index, const Vector3 &value) |
Updates a single point in the spline. | |
Vector3 | interpolate (Real t) |
Returns an interpolated point based on a parametric value over the whole series. | |
Vector3 | interpolate (unsigned int fromIndex, Real t) |
Interpolates a single segment of the spline given a parametric value. | |
void | setAutoCalculate (bool autoCalc) |
Tells the spline whether it should automatically calculate tangents on demand as points are added. | |
void | recalcTangents (void) |
Recalculates the tangents associated with this spline. | |
Protected Attributes | |
bool | mAutoCalc |
std::vector< Vector3 > | mPoints |
std::vector< Vector3 > | mTangents |
Matrix4 | mCoeffs |
Matrix of coefficients. |
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.
Definition at line 47 of file OgreSimpleSpline.h.
|
Definition at line 35 of file OgreSimpleSpline.cpp. |
|
Definition at line 59 of file OgreSimpleSpline.cpp. |
|
Adds a control point to the end of the spline.
Definition at line 63 of file OgreSimpleSpline.cpp. References mPoints, and recalcTangents(). Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Clears all the points in the spline.
Definition at line 238 of file OgreSimpleSpline.cpp. References mPoints, and mTangents. Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Gets the number of control points in the spline.
Definition at line 233 of file OgreSimpleSpline.cpp. References mPoints. |
|
Gets the detail of one of the control points of the spline.
Definition at line 226 of file OgreSimpleSpline.cpp. References mPoints. |
|
Interpolates a single segment of the spline given a parametric value.
Definition at line 89 of file OgreSimpleSpline.cpp. References mCoeffs, mPoints, mTangents, Ogre::Real, Ogre::Vector4::x, Ogre::Vector3::x, Ogre::Vector4::y, Ogre::Vector3::y, Ogre::Vector4::z, and Ogre::Vector3::z. |
|
Returns an interpolated point based on a parametric value over the whole series.
Definition at line 72 of file OgreSimpleSpline.cpp. References mPoints, and Ogre::Real. Referenced by Ogre::AnimationTrack::getInterpolatedKeyFrame(). |
|
Recalculates the tangents associated with this spline.
Definition at line 155 of file OgreSimpleSpline.cpp. References mPoints, and mTangents. Referenced by addPoint(), Ogre::AnimationTrack::buildInterpolationSplines(), and updatePoint(). |
|
Tells the spline whether it should automatically calculate tangents on demand as points are added.
Definition at line 255 of file OgreSimpleSpline.cpp. References mAutoCalc. Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Updates a single point in the spline.
Definition at line 244 of file OgreSimpleSpline.cpp. References mPoints, and recalcTangents(). |
|
Definition at line 109 of file OgreSimpleSpline.h. Referenced by setAutoCalculate(), and SimpleSpline(). |
|
Matrix of coefficients.
Definition at line 115 of file OgreSimpleSpline.h. Referenced by interpolate(), and SimpleSpline(). |
|
Definition at line 111 of file OgreSimpleSpline.h. Referenced by addPoint(), clear(), getNumPoints(), getPoint(), interpolate(), recalcTangents(), and updatePoint(). |
|
Definition at line 112 of file OgreSimpleSpline.h. Referenced by clear(), interpolate(), and recalcTangents(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:20:28 2004