25 template<
typename KeyType,
typename AddressType >
42 void Evaluate (
Object*
object, TimeType time );
46 bool AddKey ( TimeType time,
const KeyType& value );
49 bool AddKey ( TimeType time,
const KeyType& value, InterpolatorType interpolatorType );
55 bool UpdateKey ( TimeType time,
const KeyType& newValue );
79 template<
typename KeyType,
typename AddressType >
81 : m_param( object, propertyPath )
86 KeyType curValue = m_param.GetValue(
object );
87 m_keySet.UpdateKey( TimeType( 0.0 ), curValue );
93 template<
typename KeyType,
typename AddressType >
96 KeyType value = m_keySet.Evaluate( time );
97 m_param.SetValue(
object, value );
102 template<
typename KeyType,
typename AddressType >
105 return m_keySet.AddKey( time, value );
110 template<
typename KeyType,
typename AddressType >
118 template<
typename KeyType,
typename AddressType >
126 template<
typename KeyType,
typename AddressType >
129 return m_keySet.UpdateKey( time, newValue );
134 template<
typename KeyType,
typename AddressType >
137 return m_keySet.RemoveKey( time );
142 template<
typename KeyType,
typename AddressType >
145 return m_keySet.ChangeInterpolator( idx, std::move( interpolator ) );
150 template<
typename KeyType,
typename AddressType >
153 return m_keySet.GetKey( time );
158 template<
typename KeyType,
typename AddressType >
Base class for interpolators.
Definition: IInterpolator.h:38
Evaluates animation.
Definition: AnimEvaluator.h:26
AnimEvaluator()=default
Constructor for serialization only.
bool RemoveKey(TimeType time)
Removes key in given time.
Definition: AnimEvaluator.h:135
const Key< KeyType > * GetKey(TimeType time)
Return key in given time.
Definition: AnimEvaluator.h:151
bool UpdateKey(TimeType time, const KeyType &newValue, UPtr< Interpolator > &&interpolator)
Udates key given by time. Sets new interpolator.
Definition: AnimEvaluator.h:119
Animation key.
Definition: IInterpolator.h:21
Set of animation keys and interpolators.
Definition: KeySet.h:25
bool AddKey(TimeType time, const KeyType &value)
Adds key and sets default interpolator.
Definition: AnimEvaluator.h:103
bool ChangeInterpolator(Size idx, UPtr< Interpolator > &&interpolator)
Updates interpolator. Key remains unchanged.
Definition: AnimEvaluator.h:143
Base clas for all objects in sleeping wombat libraries.
Definition: Object.h:42
virtual KeySet< KeyType > & GetKeySet()
Returns KeySet.
Definition: AnimEvaluator.h:159