Crazy Eddies GUI System: CEGUI::Animation Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
CEGUI::Animation Class Reference

Defines an 'animation' class. More...

Collaboration diagram for CEGUI::Animation:
[legend]

List of all members.

## Public Types
enum | ReplayMode { RM_Once, RM_Loop, RM_Bounce }
| enumerates possible replay modes More...
## Public Member Functions
| Animation (const String &name)
| ~Animation (void)
| destructor, this destroys all affectors defined inside this animation
const String & | getName () const
| Retrieves name of this Animation definition.
void | setReplayMode (ReplayMode mode)
| Sets the replay mode of this animation.
ReplayMode | getReplayMode () const
| Retrieves the replay mode of this animation.
void | setDuration (float duration)
| Sets the duration of this animation.
float | getDuration () const
| Retrieves the duration of this animation.
void | setAutoStart (bool autoStart)
| Sets whether this animation auto starts or not.
bool | getAutoStart () const
| Retrieves auto start.
Affector * | createAffector (void)
| Creates a new Affector.
Affector * | createAffector (const String &targetProperty, const String &interpolator)
| Creates a new Affector.
void | destroyAffector (Affector *affector)
| Destroys given Affector.
Affector * | getAffectorAtIdx (size_t index) const
| Retrieves the Affector at given index.
size_t | getNumAffectors (void) const
| Retrieves number of Affectors defined in this Animation.
void | defineAutoSubscription (const String &eventName, const String &action)
| This defined a new auto subscription.
void | undefineAutoSubscription (const String &eventName, const String &action)
| This undefines previously defined auto subscription.
void | undefineAllAutoSubscriptions ()
| This undefines all previously defined auto subscriptions.
void | autoSubscribe (AnimationInstance *instance)
| Subscribes all auto subscriptions with information from given animation instance.
void | autoUnsubscribe (AnimationInstance *instance)
| Unsubscribes all auto subscriptions with information from given animation instance.
void | savePropertyValues (AnimationInstance *instance)
| Internal method, causes all properties that are used by this animation and it's affectors to be saved.
void | apply (AnimationInstance *instance)
| Applies this Animation definition using information from given AnimationInstance.

## Detailed Description

Defines an 'animation' class.

This is definition of Animation. Can be reused multiple times via AnimationInstance class. You can't step this class directly, you have to instantiate it via AnimationManager::instantiateAnimation.

AnimationInstance provides means for stepping the animation and applying it to PropertySets.

  Animation itself doesn't contain key frames. It is composed of Affector(s). Each Affector affects one Property. So one Animation can affect multiple properties.

See also:
  AnimationInstance, Affector

## Member Enumeration Documentation

enum CEGUI::Animation::ReplayMode

enumerates possible replay modes

Enumerator:

  RM_Once | plays the animation just once, then stops
  RM_Loop | loops the animation infinitely
  RM_Bounce | infinitely plays the animation forward, when it reaches the end, it plays it backwards, etc...

## Constructor & Destructor Documentation

CEGUI::Animation::Animation | ( | const String & | name | ) |

internal constructor, please only construct animations via AnimationManager::createAnimation method

## Member Function Documentation

void CEGUI::Animation::apply | ( | AnimationInstance * | instance | ) |

Applies this Animation definition using information from given AnimationInstance.

  This is internal method, only use if you know what you're doing!

void CEGUI::Animation::autoSubscribe | ( | AnimationInstance * | instance | ) |

Subscribes all auto subscriptions with information from given animation instance.

  This is internal method! Only use if you know what you're doing!

void CEGUI::Animation::autoUnsubscribe | ( | AnimationInstance * | instance | ) |

Unsubscribes all auto subscriptions with information from given animation instance.

  This is internal method! Only use if you know what you're doing!

Affector* CEGUI::Animation::createAffector | ( | const String & | targetProperty,
|  | const String & | interpolator
| ) |  |

Creates a new Affector.

  This is just a helper, finger saving method.

Affector* CEGUI::Animation::createAffector | ( | void |  | ) |

Creates a new Affector.

See also:
  Affector

void CEGUI::Animation::defineAutoSubscription | ( | const String & | eventName,
|  | const String & | action
| ) |  |

This defined a new auto subscription.

Parameters:

  eventName | the name of the event we want to subscribe to, CEGUI::Window::EventClicked for example
  action | is the action that will be invoked on the animation instance if this event is fired

  Auto Subscription does subscribe to event sender (usually target window) of Animation Instance when the event source is set.

Usable action strings:

- Start
- Stop
- Pause
- Unpause
- TogglePause

eventName is the name of the event we want to subscribe to

bool CEGUI::Animation::getAutoStart | ( |  | ) | const

Retrieves auto start.

See also:
  Animation::setAutoStart

void CEGUI::Animation::savePropertyValues | ( | AnimationInstance * | instance | ) |

Internal method, causes all properties that are used by this animation and it's affectors to be saved.

  So their values are still known after they've been affected.

void CEGUI::Animation::setAutoStart | ( | bool | autoStart | ) |

Sets whether this animation auto starts or not.

  Auto start means that the animation instances of this definition call Start on themselves once their target is set.

void CEGUI::Animation::undefineAllAutoSubscriptions | ( |  | ) |

This undefines all previously defined auto subscriptions.

See also:
  Animation::defineAutoSubscription

void CEGUI::Animation::undefineAutoSubscription | ( | const String & | eventName,
|  | const String & | action
| ) |  |

This undefines previously defined auto subscription.

See also:
  Animation::defineAutoSubscription