#include <AnimationStrategy.h>
Inherited by DestructionStrategy.
Inheritance diagram for AnimationStrategy:
Public Member Functions | |
AnimationStrategy (void) | |
virtual | ~AnimationStrategy (void) |
float | getAnimationStep () |
void | setAnimationStep (float value) |
float | getAnimationParameter () |
void | setAnimationParameter (float value) |
float | getAnimationDuration () |
void | setAnimationDuration (float durationInSecs) |
Protected Member Functions | |
void | process () |
void | onEvent (LargeDisplayEvent *evt) |
virtual void | animate ()=0 |
virtual void | onAnimationEnd () |
virtual void | onAnimationStart (LargeDisplayEvent *evt) |
Protected Attributes | |
bool | animating |
float | animationStep |
float | animationParameter |
float | animationDuration |
AnimationStrategy::AnimationStrategy | ( | void | ) |
Creates an AnimationStrategy instance.
AnimationStrategy::~AnimationStrategy | ( | void | ) | [virtual] |
Destroys this strategy.
float AnimationStrategy::getAnimationStep | ( | ) | [inline] |
Returns the value of the animation step.
void AnimationStrategy::setAnimationStep | ( | float | value | ) | [inline] |
Sets the value of the animation step.
value | the value of the animation step. |
float AnimationStrategy::getAnimationParameter | ( | ) | [inline] |
Returns the value of the animation parameter.
void AnimationStrategy::setAnimationParameter | ( | float | value | ) | [inline] |
Sets the value of the animation parameter.
value | the value of the animation parameter. |
float AnimationStrategy::getAnimationDuration | ( | ) | [inline] |
Returns the current value of the duration of the animation in seconds.
void AnimationStrategy::setAnimationDuration | ( | float | durationInSecs | ) | [inline] |
Sets the animation to last the given duration in seconds. In the beginning of the animation, the value of the animation step is set so that, when the animation is fully played, it approximately has the given duration in seconds, based on the application frame rate at the moment the animation is started. If this value is set as less or equal than zero, the animation step is not changed.
durationInSecs | the approximate duration of the animation in seconds. |
void AnimationStrategy::process | ( | ) | [protected] |
Performs a given action before rendering the component.
void AnimationStrategy::onEvent | ( | LargeDisplayEvent * | evt | ) | [protected] |
Handles the given event.
evt | the event to be handled. |
virtual void AnimationStrategy::animate | ( | ) | [protected, pure virtual] |
Carries the frame update that provides the animation of the associated component. It is run inside the process() method for every animation frame update.
Implemented in DestructionStrategy.
virtual void AnimationStrategy::onAnimationEnd | ( | ) | [inline, protected, virtual] |
Performs a specific action when the animation is over.
Reimplemented in DestructionStrategy.
virtual void AnimationStrategy::onAnimationStart | ( | LargeDisplayEvent * | evt | ) | [inline, protected, virtual] |
Performs a specific action when the animation starts.
evt | the event that triggered the animation. |
Reimplemented in DestructionStrategy.
bool AnimationStrategy::animating [protected] |
Flag for starting the animation.
float AnimationStrategy::animationStep [protected] |
The increment for the animation parameter.
float AnimationStrategy::animationParameter [protected] |
The current animation parameter.
float AnimationStrategy::animationDuration [protected] |
The duration of the animation in seconds.