#include <OgreRotationalSpline.h>
Public Methods | |
RotationalSpline () | |
~RotationalSpline () | |
void | addPoint (const Quaternion &p) |
Adds a control point to the end of the spline. | |
const Quaternion & | 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 Quaternion &value) |
Updates a single point in the spline. | |
Quaternion | interpolate (Real t, bool useShortestPath=true) |
Returns an interpolated point based on a parametric value over the whole series. | |
Quaternion | interpolate (unsigned int fromIndex, Real t, bool useShortestPath=true) |
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< 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.
Definition at line 48 of file OgreRotationalSpline.h.
|
Definition at line 33 of file OgreRotationSpline.cpp. |
|
Definition at line 37 of file OgreRotationSpline.cpp. |
|
Adds a control point to the end of the spline.
Definition at line 41 of file OgreRotationSpline.cpp. References mPoints, and recalcTangents(). Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Clears all the points in the spline.
Definition at line 192 of file OgreRotationSpline.cpp. References mPoints, and mTangents. Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Gets the number of control points in the spline.
Definition at line 187 of file OgreRotationSpline.cpp. References mPoints. |
|
Gets the detail of one of the control points of the spline.
Definition at line 180 of file OgreRotationSpline.cpp. References mPoints. |
|
Interpolates a single segment of the spline given a parametric value.
Definition at line 62 of file OgreRotationSpline.cpp. References mPoints, mTangents, and Ogre::Real. |
|
Returns an interpolated point based on a parametric value over the whole series.
Definition at line 50 of file OgreRotationSpline.cpp. References mPoints, and Ogre::Real. Referenced by Ogre::AnimationTrack::getInterpolatedKeyFrame(). |
|
Recalculates the tangents associated with this spline.
Definition at line 98 of file OgreRotationSpline.cpp. References Ogre::Quaternion::Exp(), Ogre::Quaternion::Inverse(), Ogre::Quaternion::Log(), 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 209 of file OgreRotationSpline.cpp. References mAutoCalc. Referenced by Ogre::AnimationTrack::buildInterpolationSplines(). |
|
Updates a single point in the spline.
Definition at line 198 of file OgreRotationSpline.cpp. References mPoints, and recalcTangents(). |
|
Definition at line 111 of file OgreRotationalSpline.h. Referenced by setAutoCalculate(). |
|
Definition at line 115 of file OgreRotationalSpline.h. Referenced by addPoint(), clear(), getNumPoints(), getPoint(), interpolate(), recalcTangents(), and updatePoint(). |
|
Definition at line 116 of file OgreRotationalSpline.h. Referenced by clear(), interpolate(), and recalcTangents(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:33 2004