List of all members | Public Member Functions | Related Functions
thor::RefAnimation< Animation > Class Template Reference

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...
 

Detailed Description

template<typename Animation>
class thor::RefAnimation< Animation >

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().

Constructor & Destructor Documentation

template<typename Animation>
thor::RefAnimation< Animation >::RefAnimation ( Animation &  referenced)
explicit

Constructor.

Parameters
referencedAnimation to reference. Must remain valid during usage.

Member Function Documentation

template<typename Animation>
template<typename Animated >
void thor::RefAnimation< Animation >::operator() ( Animated &  animated,
float  progress 
)

Animates the object.

Forwards the call to the referenced animation.


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