Bromeon
Public Types | Public Member Functions
thor::Animation Class Reference

Abstract base class for animations. More...

Inheritance diagram for thor::Animation:
Inheritance graph

List of all members.

Public Types

typedef std::tr1::shared_ptr
< Animation
Ptr
 Shared pointer type to Animation objects.

Public Member Functions

virtual void Apply (sf::Sprite &target, float progress) const =0
 Applies the animation to a sprite.

Detailed Description

Abstract base class for animations.

This class defines the interface for concrete animations that affect sf::Sprite. Note that thor::Animation and its derivates do not store the current animation progress. They only specify how an animation runs, i.e. how it changes depending on the progress. The actual progress is computed by thor::Animator. As a result of this separation, multiple animators can refer to a single animation.


Member Function Documentation

virtual void thor::Animation::Apply ( sf::Sprite &  target,
float  progress 
) const [pure virtual]

Applies the animation to a sprite.

Parameters:
targetThe sprite who is modified according to the animation.
progressTotal animation progress, in the interval [0,1].

Implemented in thor::FrameAnimation.


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