Terminus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
terminus::CatmullRomSpline Class Reference

The CatmullRomSpline class implements a spline, that is determined by control points that lie on the spline. More...

#include <catmullromspline.h>

Public Member Functions

 CatmullRomSpline (const std::vector< QVector2D > &controlPoints)
 
virtual ~CatmullRomSpline ()
 
virtual QVector2D getPosition (float param) const
 evaluate the spline function for the given parameter More...
 
virtual float length () const
 

Protected Member Functions

virtual void calculateKnotSequence ()
 
virtual float ctlPointDistance (int i) const
 
virtual int getIndex (float t) const
 
virtual QVector2D spline (int i0, float t) const
 

Protected Attributes

std::vector< QVector2D > m_controlPoints
 
std::vector< float > m_knotSequence
 
float m_tBegin
 
float m_tEnd
 

Detailed Description

The CatmullRomSpline class implements a spline, that is determined by control points that lie on the spline.

Constructor & Destructor Documentation

terminus::CatmullRomSpline::CatmullRomSpline ( const std::vector< QVector2D > &  controlPoints)
terminus::CatmullRomSpline::~CatmullRomSpline ( )
virtual

Member Function Documentation

void terminus::CatmullRomSpline::calculateKnotSequence ( )
protectedvirtual
float terminus::CatmullRomSpline::ctlPointDistance ( int  i) const
protectedvirtual
int terminus::CatmullRomSpline::getIndex ( float  t) const
protectedvirtual
QVector2D terminus::CatmullRomSpline::getPosition ( float  param) const
virtual

evaluate the spline function for the given parameter

Parameters
param
Returns
point on the spline that corresponds to param
float terminus::CatmullRomSpline::length ( ) const
virtual
Returns
the maximum parameter that this spline is defined for
QVector2D terminus::CatmullRomSpline::spline ( int  i0,
float  t 
) const
protectedvirtual

Member Data Documentation

std::vector<QVector2D> terminus::CatmullRomSpline::m_controlPoints
protected
std::vector<float> terminus::CatmullRomSpline::m_knotSequence
protected
float terminus::CatmullRomSpline::m_tBegin
protected
float terminus::CatmullRomSpline::m_tEnd
protected

The documentation for this class was generated from the following files: