Main Page | Class Hierarchy | Class List | Class Members

DVR::Math::PositionalSpline Class Reference

List of all members.

Public Member Functions

 PositionalSpline ()
void AddPoint (Vector3 point)
void Clear ()
Vector3 GetPoint (int index)
Vector3 Interpolate (float t)
Vector3 Interpolate (int index, float t)
void RecalculateTangents ()

Properties

bool AutoCalculate
int PointCount

Detailed Description

A Catmull-Rom spline that can be used for interpolating translation movements. A Catmull-Rom spline is a derivitive of the Hermite spline. The difference is that the Hermite spline allows you to specifiy 2 endpoints and 2 tangents, then the spline is generated. A Catmull-Rom spline allows you to just supply 1-n number of points and the tangents will be automatically calculated. <p/> Derivation of the hermite polynomial can be found here: Hermite splines.


Constructor & Destructor Documentation

DVR::Math::PositionalSpline::PositionalSpline  )  [inline]
 

Creates a new Positional Spline.


Member Function Documentation

void DVR::Math::PositionalSpline::AddPoint Vector3  point  )  [inline]
 

Adds a new control point to the end of this spline.

void DVR::Math::PositionalSpline::Clear  )  [inline]
 

Removes all current control points from this spline.

Vector3 DVR::Math::PositionalSpline::GetPoint int  index  )  [inline]
 

Returns the point at the specified index. Index at which to retreive a point. Vector3 containing the point data.

Vector3 DVR::Math::PositionalSpline::Interpolate int  index,
float  t
[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.

Vector3 DVR::Math::PositionalSpline::Interpolate float  t  )  [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. An interpolated point along the spline.

void DVR::Math::PositionalSpline::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 DVR::Math::PositionalSpline::AutoCalculate [get, set]
 

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

int DVR::Math::PositionalSpline::PointCount [get]
 

Gets the number of control points in this spline.


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 22:19:44 2004 for DirectVolumeRenderer by doxygen 1.3.6