16 template<
typename KeyType >
60 template<
typename KeyType >
69 template<
typename KeyType >
75 auto leftResult = ( 1.0 + (-1.0f) * progress ) * left.
Value;
76 auto rightResult = progress * right.
Value;
78 return static_cast< KeyType >( leftResult + rightResult );
83 template<
typename KeyType >
94 template<
typename KeyType >
97 return Tangent( left, right );
102 template<
typename KeyType >
105 return Tangent( left, right );
115 template<
typename KeyType >
121 return static_cast< KeyType >( (
TimeType( 1.0f ) / timeInterval )* valueInterval );
TimeType Time
Definition: Key.h:16
~LinearInterpolator()=default
Base class for interpolators.
Definition: IInterpolator.h:38
KeyType
Definition: all_0.js:13
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...
Definition: LinearInterpolator.h:95
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.
Definition: LinearInterpolator.h:84
LinearInterpolator()=default
Constructor for serialization.
Linear interpolator.
Definition: LinearInterpolator.h:17
Animation key.
Definition: IInterpolator.h:21
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...
Definition: LinearInterpolator.h:103
virtual KeyType Interpolate(TimeType time, Key< KeyType > &left, Key< KeyType > &right) override
Main function invoked by evaluator.
Definition: LinearInterpolator.h:70
double TimeType
Definition: TypesDefinitions.h:39
ValueType Value
Definition: Key.h:17
KeyType Tangent(const Key< KeyType > &left, const Key< KeyType > &right) const
Definition: LinearInterpolator.h:116