Sleeping Wombat GUI  0.100
swGUI
Public Member Functions | List of all members
IInterpolator< KeyType > Class Template Referenceabstract

Base class for interpolators. More...

#include <IInterpolator.h>

Inheritance diagram for IInterpolator< KeyType >:
CosinusInterpolator< KeyType > DiscreteInterpolator< KeyType > DummyInterpolator< KeyType > LinearInterpolator< KeyType >

Public Member Functions

 IInterpolator ()=default
 
virtual ~IInterpolator ()=default
 
virtual KeyType Interpolate (TimeType time, Key< KeyType > &left, Key< KeyType > &right)=0
 Main function invoked by evaluator. More...
 
virtual void Update (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)=0
 Function updates interpolator, when left or right key value changes. More...
 
virtual KeyType LeftTangent (const Key< KeyType > &left, const Key< KeyType > &right) const =0
 Returns curve tangent. Function can be used by surrounding interpolators to smooth curve. More...
 
virtual KeyType RightTangent (const Key< KeyType > &left, const Key< KeyType > &right) const =0
 Returns curve tangent. Function can be used by surrounding interpolators to smooth curve. More...
 

Detailed Description

template<typename KeyType>
class IInterpolator< KeyType >

Base class for interpolators.

Constructor & Destructor Documentation

template<typename KeyType >
IInterpolator< KeyType >::IInterpolator ( )
explicitdefault
template<typename KeyType >
virtual IInterpolator< KeyType >::~IInterpolator ( )
virtualdefault

Member Function Documentation

template<typename KeyType >
virtual KeyType IInterpolator< KeyType >::Interpolate ( TimeType  time,
Key< KeyType > &  left,
Key< KeyType > &  right 
)
pure virtual
template<typename KeyType >
virtual KeyType IInterpolator< KeyType >::LeftTangent ( const Key< KeyType > &  left,
const Key< KeyType > &  right 
) const
pure virtual

Returns curve tangent. Function can be used by surrounding interpolators to smooth curve.

Implemented in DummyInterpolator< KeyType >, LinearInterpolator< KeyType >, CosinusInterpolator< KeyType >, and DiscreteInterpolator< KeyType >.

template<typename KeyType >
virtual KeyType IInterpolator< KeyType >::RightTangent ( const Key< KeyType > &  left,
const Key< KeyType > &  right 
) const
pure virtual

Returns curve tangent. Function can be used by surrounding interpolators to smooth curve.

Implemented in DummyInterpolator< KeyType >, LinearInterpolator< KeyType >, CosinusInterpolator< KeyType >, and DiscreteInterpolator< KeyType >.

template<typename KeyType >
virtual void IInterpolator< KeyType >::Update ( const Key< KeyType > &  leftKey,
const Key< KeyType > &  rightKey,
UPtr< const IInterpolator< KeyType > > &  leftInterpolator,
UPtr< const IInterpolator< KeyType > > &  rightInterpolator 
)
pure virtual

Function updates interpolator, when left or right key value changes.

Note
Left or right interpolator can be nullptr, but keys always exist.

Implemented in DummyInterpolator< KeyType >, LinearInterpolator< KeyType >, CosinusInterpolator< KeyType >, and DiscreteInterpolator< KeyType >.


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