Namespaces | Classes | Functions
Animations

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

Namespaces

 thor::Playback
 Namespace for animation playback schemes.
 

Classes

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

Functions

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)
related

Creates an animation that references another one.

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

Example:

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