Main Page | Class Hierarchy | Class List | Class Members

SC::Math::RotationalSpline Class Reference

List of all members.

Public Member Functions

 RotationalSpline ()
void AddPoint (Quaternion point)
void Clear ()
Quaternion Interpolate (float t, bool useShortestPath)
Quaternion Interpolate (int index, float t, bool useShortestPath)
void RecalculateTangents ()

Properties

bool AutoCalculate
int PointCount

Detailed Description

A class used to interpolate orientations (rotations) along a spline using derivatives of quaternions. Like the PositionalSpline class, this class is about interpolating values smoothly over a spline. Whilst PositionalSpline deals with positions (the normal sense we think about splines), this class interpolates orientations. The theory is identical, except we're now in 4-dimensional space instead of 3. <p/> 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 PositionalSpline 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.


Constructor & Destructor Documentation

SC::Math::RotationalSpline::RotationalSpline  )  [inline]
 

Creates a new Rotational Spline.


Member Function Documentation

void SC::Math::RotationalSpline::AddPoint Quaternion  point  )  [inline]
 

Adds a control point to the end of the spline.

void SC::Math::RotationalSpline::Clear  )  [inline]
 

Removes all current control points from this spline.

Quaternion SC::Math::RotationalSpline::Interpolate int  index,
float  t,
bool  useShortestPath
[inline]
 

Interpolates a single segment of the spline given a parametric value. The point index to treat as t=0. index + 1 is deemed to be t=1 Parametric value An interpolated point along the spline.

Quaternion SC::Math::RotationalSpline::Interpolate float  t,
bool  useShortestPath
[inline]
 

Returns an interpolated point based on a parametric value over the whole series. Given a t value between 0 and 1 representing the parametric distance along the whole length of the spline, this method returns an interpolated point. Parametric value. True forces rotations to use the shortest path. An interpolated point along the spline.

void SC::Math::RotationalSpline::RecalculateTangents  )  [inline]
 

Recalculates the tangents associated with this spline. If you tell the spline not to update on demand by setting AutoCalculate to false, then you must call this after completing your updates to the spline points.


Property Documentation

bool SC::Math::RotationalSpline::AutoCalculate [get, set]
 

Specifies whether or not to recalculate tangents as each control point is added.

int SC::Math::RotationalSpline::PointCount [get]
 

Gets the number of control points in this spline.


The documentation for this class was generated from the following file:
Generated on Sat Jan 15 23:59:00 2005 for StreamCtrl by doxygen 1.3.6