Namespaces | Classes | Functions

Classes able to animate graphical objects in different ways. More...


 Namespace for animation playback schemes.


class  thor::Animator< Animated, Id >
 Class to animate objects. More...
class  thor::AnimationMap< Animated, Id >
 Class that stores multiple animations. More...
class  thor::ColorAnimation
 Changes an object's color smoothly over time. More...
class  thor::FadeAnimation
 Lets an object fade in or out. More...
class  thor::FrameAnimation
 Changes a sprite's subrect over time. More...
class  thor::RefAnimation< Animation >
 Class to reference another animation. More...


template<typename Animation >
RefAnimation< Animation > refAnimation (Animation &referenced)
 Creates an animation that references another one. More...

Detailed Description

Classes able to animate graphical objects in different ways.

Function Documentation

template<typename Animation >
RefAnimation< Animation > refAnimation ( Animation &  referenced)

Creates an animation that references another one.

referencedAnimation to reference. Must remain valid during usage.

Creates an animation object 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::AnimationMap. On the other side, you must make sure the original animation stays alive while being referenced.


// Create animation
// Insert reference into animation map
thor::AnimationMap<...> animations;
animations.addAnimation(..., thor::refAnimation(anim), ...);
// Later changes will affect animation inside animator