Class to reference another animation. More...
Public Member Functions | |
RefAnimation (Animation &referenced) | |
Constructor. More... | |
template<typename Animated > | |
void | operator() (Animated &animated, float progress) |
Animates the object. More... | |
Related Functions | |
template<typename Animation > | |
RefAnimation< Animation > | refAnimation (Animation &referenced) |
Creates an animation that references another one. More... | |
Class to reference another animation.
This class can be used to create an animation that has no functionality on its own, but references another existing animation. By using it, you can avoid copies and change the original animation object, even after it has been added to a thor::Animator. On the other side, you must make sure the original animation stays alive while being referenced.
Usually, you create objects of this class by calling thor::refAnimation().
|
explicit |
Constructor.
referenced | Animation to reference. Must remain valid during usage. |
void thor::RefAnimation< Animation >::operator() | ( | Animated & | animated, |
float | progress | ||
) |
Animates the object.
Forwards the call to the referenced animation.