Public Member Functions

sp::math::FunctionalInterpolator< T, I, Func > Class Template Reference

#include <spMathInterpolator.hpp>

Inheritance diagram for sp::math::FunctionalInterpolator< T, I, Func >:
sp::math::Interpolator

List of all members.

Public Member Functions

 FunctionalInterpolator (const T &Min=T(0), const T &Max=T(1))
 ~FunctionalInterpolator ()
void play (const I &Speed)
void play (u64 Duration)
void stop (bool Reset=false)
void update ()
get () const
bool playing () const
 Returns true if the interpolation 'animation' is currently being played.
bool finished () const
 Returns true if the interpolation 'animation' has finished.
void setState (const I &State)
const I & getState () const
void setMin (const T &Min)
const T & getMin () const
void setMax (const T &Max)
const T & getMax () const

Detailed Description

template<typename T, typename I, T Func>
class sp::math::FunctionalInterpolator< T, I, Func >

The functional interpolator class can be used to make comfortable interpolations. You can pass an interpolation function as template parameter. There are several predefined functions.

Template Parameters:
T Specifies the type of the points (e.g. float, dim::point2df, dim::vector3df etc.).
I Specifies the interpolation data type. This should be a float or a double.
Func Specifies the interpolation function. This can be "Lerp", "LerpParabolic" or "LerpSin".
See also:
LinearInterpolator
ParabolicInterpolator
SinInterpolator
Lerp
LerpParabolic
LerpSin
Since:
Version 3.2

Constructor & Destructor Documentation

template<typename T , typename I , T Func>
sp::math::FunctionalInterpolator< T, I, Func >::FunctionalInterpolator ( const T &  Min = T(0),
const T &  Max = T(1) 
) [inline]
template<typename T , typename I , T Func>
sp::math::FunctionalInterpolator< T, I, Func >::~FunctionalInterpolator (  )  [inline]

Member Function Documentation

template<typename T , typename I , T Func>
bool sp::math::FunctionalInterpolator< T, I, Func >::finished (  )  const [inline]

Returns true if the interpolation 'animation' has finished.

template<typename T , typename I , T Func>
T sp::math::FunctionalInterpolator< T, I, Func >::get (  )  const [inline]
template<typename T , typename I , T Func>
const T& sp::math::FunctionalInterpolator< T, I, Func >::getMax (  )  const [inline]
template<typename T , typename I , T Func>
const T& sp::math::FunctionalInterpolator< T, I, Func >::getMin (  )  const [inline]
template<typename T , typename I , T Func>
const I& sp::math::FunctionalInterpolator< T, I, Func >::getState (  )  const [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::play ( const I &  Speed  )  [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::play ( u64  Duration  )  [inline]
template<typename T , typename I , T Func>
bool sp::math::FunctionalInterpolator< T, I, Func >::playing (  )  const [inline, virtual]

Returns true if the interpolation 'animation' is currently being played.

Implements sp::math::Interpolator.

template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::setMax ( const T &  Max  )  [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::setMin ( const T &  Min  )  [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::setState ( const I &  State  )  [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::stop ( bool  Reset = false  )  [inline]
template<typename T , typename I , T Func>
void sp::math::FunctionalInterpolator< T, I, Func >::update (  )  [inline, virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines