# Cinder

# cinder::BSpline< T > Class Template Reference

`#include <BSpline.h>`

List of all members.

## Public Member Functions
| BSpline (const std::vector< T > &points, int degree, bool loop, bool open)
| BSpline ()
| BSpline (int numControlPoints, const T *controlPoints, int degree, bool loop, const float *knots)
| BSpline (const BSpline &bspline)
BSpline & | operator= (const BSpline &bspline)
| ~BSpline ()
int | getNumControlPoints () const
int | getDegree () const
int | getNumSpans () const
bool | isOpen () const
bool | isUniform () const
bool | isLoop () const
void | setControlPoint (int i, const T &rkCtrl)
T | getControlPoint (int i) const
void | setKnot (int i, float fKnot)
float | getKnot (int i) const
T | getPosition (float t) const
T | getDerivative (float t) const
T | getSecondDerivative (float t) const
T | getThirdDerivative (float t) const
T::TYPE | getSpeed (float t) const
float | getLength (float fT0, float fT1) const
void | get (float t, T *position, T *firstDerivative=NULL, T *secondDerivative=NULL, T *thirdDerivative=NULL) const
float | getTime (float length) const
| Returns the time associated with an arc length in the range [0,getLength(0,1)].
BSplineBasis & | getBasis ()
## Protected Member Functions
void | createControl (const T *akCtrlPoint)
## Protected Attributes
int | mNumCtrlPoints
T * | mCtrlPoints
bool | mLoop
BSplineBasis | mBasis
int | mReplicate

### template<typename T>
class cinder::BSpline< T >

## Constructor & Destructor Documentation

template<typename T >

cinder::BSpline< T >::BSpline | ( | const std::vector< T > & | points,
|  | int | degree,
|  | bool | loop,
|  | bool | open |
| ) |  |  |

template<typename T>

cinder::BSpline< T >::BSpline | ( |  | ) |

template<typename T >

cinder::BSpline< T >::BSpline | ( | int | numControlPoints,
|  | const T * | controlPoints,
|  | int | degree,
|  | bool | loop,
|  | const float * | knots |
| ) |  |  |

template<typename T >

cinder::BSpline< T >::BSpline | ( | const BSpline< T > & | bspline | ) |

template<typename T >

cinder::BSpline< T >::~BSpline | ( |  | ) |

## Member Function Documentation

template<typename T >

BSpline< T > & cinder::BSpline< T >::operator= | ( | const BSpline< T > & | bspline | ) |

template<typename T>

int cinder::BSpline< T >::getNumControlPoints | ( |  | ) | const

template<typename T>

int cinder::BSpline< T >::getDegree | ( |  | ) | const

template<typename T>

int cinder::BSpline< T >::getNumSpans | ( |  | ) | const

template<typename T>

bool cinder::BSpline< T >::isOpen | ( |  | ) | const

template<typename T>

bool cinder::BSpline< T >::isUniform | ( |  | ) | const

template<typename T>

bool cinder::BSpline< T >::isLoop | ( |  | ) | const

template<typename T >

void cinder::BSpline< T >::setControlPoint | ( | int | i,
|  | const T & | rkCtrl |
| ) |  |  |

template<typename T >

T cinder::BSpline< T >::getControlPoint | ( | int | i | ) | const

template<typename T >

void cinder::BSpline< T >::setKnot | ( | int | i,
|  | float | fKnot |
| ) |  |  |

template<typename T >

float cinder::BSpline< T >::getKnot | ( | int | i | ) | const

template<typename T >

T cinder::BSpline< T >::getPosition | ( | float | t | ) | const

template<typename T >

T cinder::BSpline< T >::getDerivative | ( | float | t | ) | const

template<typename T >

T cinder::BSpline< T >::getSecondDerivative | ( | float | t | ) | const

template<typename T >

T cinder::BSpline< T >::getThirdDerivative | ( | float | t | ) | const

template<typename T>

T::TYPE cinder::BSpline< T >::getSpeed | ( | float | t | ) | const

template<typename T >

float cinder::BSpline< T >::getLength | ( | float | fT0,
|  | float | fT1 |
| ) |  |  | const

template<typename T >

void cinder::BSpline< T >::get | ( | float | t,
|  | T * | position,
|  | T * | firstDerivative = `NULL`,
|  | T * | secondDerivative = `NULL`,
|  | T * | thirdDerivative = `NULL` |
| ) |  |  | const

template<typename T >

float cinder::BSpline< T >::getTime | ( | float | length | ) | const

Returns the time associated with an arc length in the range [0,getLength(0,1)].

template<typename T >

BSplineBasis & cinder::BSpline< T >::getBasis | ( |  | ) |

template<typename T >

void cinder::BSpline< T >::createControl | ( | const T * | akCtrlPoint | ) | `[protected]`

## Member Data Documentation

template<typename T>

int cinder::BSpline< T >::mNumCtrlPoints`[protected]`

template<typename T>

T* cinder::BSpline< T >::mCtrlPoints`[protected]`

template<typename T>

bool cinder::BSpline< T >::mLoop`[protected]`

template<typename T>

BSplineBasis cinder::BSpline< T >::mBasis`[protected]`

template<typename T>

int cinder::BSpline< T >::mReplicate`[protected]`

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

- include/cinder/BSpline.h
- src/cinder/BSpline.cpp