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

#include <DiscreteInterpolator.h>

Inheritance diagram for DiscreteInterpolator< KeyType >:
IInterpolator< KeyType >

Public Member Functions

 DiscreteInterpolator ()=default
 Constructor for serialization. More...
 
 DiscreteInterpolator (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator)
 Constructor for default interpolator creation function. More...
 
 ~DiscreteInterpolator ()=default
 
virtual KeyType Interpolate (TimeType time, Key< KeyType > &left, Key< KeyType > &right) override
 Interpolates value. More...
 
virtual void Update (const Key< KeyType > &leftKey, const Key< KeyType > &rightKey, UPtr< const IInterpolator< KeyType > > &leftInterpolator, UPtr< const IInterpolator< KeyType > > &rightInterpolator) override
 Function updates interpolator, when left or right key value changes. More...
 
virtual KeyType LeftTangent (const Key< KeyType > &left, const Key< KeyType > &right) const override
 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 override
 Returns curve tangent. Function can be used by surrounding interpolators to smooth curve. More...
 
- Public Member Functions inherited from IInterpolator< KeyType >
 IInterpolator ()=default
 
virtual ~IInterpolator ()=default
 

Constructor & Destructor Documentation

template<typename KeyType >
DiscreteInterpolator< KeyType >::DiscreteInterpolator ( )
explicitdefault

Constructor for serialization.

template<typename KeyType >
DiscreteInterpolator< KeyType >::DiscreteInterpolator ( const Key< KeyType > &  leftKey,
const Key< KeyType > &  rightKey,
UPtr< const IInterpolator< KeyType > > &  leftInterpolator,
UPtr< const IInterpolator< KeyType > > &  rightInterpolator 
)
inlineexplicit

Constructor for default interpolator creation function.

template<typename KeyType >
DiscreteInterpolator< KeyType >::~DiscreteInterpolator ( )
default

Member Function Documentation

template<typename KeyType >
KeyType DiscreteInterpolator< KeyType >::Interpolate ( TimeType  time,
Key< KeyType > &  left,
Key< KeyType > &  right 
)
inlineoverridevirtual

Interpolates value.

Implements IInterpolator< KeyType >.

template<typename KeyType >
KeyType DiscreteInterpolator< KeyType >::LeftTangent ( const Key< KeyType > &  left,
const Key< KeyType > &  right 
) const
inlineoverridevirtual

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

Implements IInterpolator< KeyType >.

template<typename KeyType >
KeyType DiscreteInterpolator< KeyType >::RightTangent ( const Key< KeyType > &  left,
const Key< KeyType > &  right 
) const
inlineoverridevirtual

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

Implements IInterpolator< KeyType >.

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

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

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

Implements IInterpolator< KeyType >.


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