vtdata library
Public Member Functions
CubicSpline Class Reference

List of all members.

Public Member Functions

void Cleanup ()
int AddPoint (const DPoint3 &vec)
bool Generate ()
bool Interpolate (double par, DPoint3 *vec, DPoint3 *dvec=NULL, DPoint3 *ddvec=NULL) const
int NumPoints () const

Detailed Description

Implements interpolation of a cubic spline curved, defined by a set of control points. The curve will pass through each control point.


Member Function Documentation

int CubicSpline::AddPoint ( const DPoint3 vec)

Adds an interpolation point.

void CubicSpline::Cleanup ( )

Re-initialization.

bool CubicSpline::Generate ( )

Generate the spline coeffs.

bool CubicSpline::Interpolate ( double  par,
DPoint3 vec,
DPoint3 dvec = NULL,
DPoint3 ddvec = NULL 
) const

Perform interpolation.

Parameters:
parThe interpolation parameter, in the range of 0 to N, where N is the number of segments (one less than the number of control points that define the curve).
vecThe point that results from the interpolation.
dvecTangential vector (optional).
ddvecCurvature vector (optional).
int CubicSpline::NumPoints ( ) const [inline]

Return number of control points that define this curve.

 All Classes Files Functions Variables Enumerations Enumerator