#include <AnimationClip.h>
Classes | |
class | Listener |
struct | ListenerEvent |
Public Member Functions | |
const char * | getTypeName () const |
const char * | getId () const |
Animation * | getAnimation () const |
unsigned long | getStartTime () const |
unsigned long | getEndTime () const |
float | getElapsedTime () const |
void | setRepeatCount (float repeatCount) |
float | getRepeatCount () const |
void | setActiveDuration (unsigned long duration) |
unsigned long | getActiveDuration () const |
unsigned long | getDuration () const |
void | setSpeed (float speed) |
float | getSpeed () const |
void | setBlendWeight (float blendWeight) |
float | getBlendWeight () const |
void | setLoopBlendTime (float loopBlendTime) |
float | getLoopBlendTime () const |
bool | isPlaying () const |
void | play () |
void | stop () |
void | pause () |
void | crossFade (AnimationClip *clip, unsigned long duration) |
void | addBeginListener (AnimationClip::Listener *listener) |
void | removeBeginListener (AnimationClip::Listener *listener) |
void | addEndListener (AnimationClip::Listener *listener) |
void | removeEndListener (AnimationClip::Listener *listener) |
void | addListener (AnimationClip::Listener *listener, unsigned long eventTime) |
void | removeListener (AnimationClip::Listener *listener, unsigned long eventTime) |
Static Public Attributes | |
static const unsigned int | REPEAT_INDEFINITE = 0 |
Defines the runtime session of an Animation to be played.
void gameplay::AnimationClip::addBeginListener | ( | AnimationClip::Listener * | listener | ) |
Adds an animation begin listener.
listener | The listener to be called when an AnimationClip begins. |
void gameplay::AnimationClip::addEndListener | ( | AnimationClip::Listener * | listener | ) |
Adds an animation end listener.
listener | The listener to be called when an AnimationClip ends. |
void gameplay::AnimationClip::addListener | ( | AnimationClip::Listener * | listener, |
unsigned long | eventTime | ||
) |
Adds an animation listener to be called back at the specified eventTime during the playback of the AnimationClip.
listener | The listener to be called when the AnimationClip reaches the specified time in its playback. |
eventTime | The time the listener will be called during the playback of the AnimationClip. Must be between 0 and the duration of the AnimationClip. |
void gameplay::AnimationClip::crossFade | ( | AnimationClip * | clip, |
unsigned long | duration | ||
) |
Fades this clip out, and the specified clip in over the given duration.
clip | The clip to fade into. |
duration | The duration of the fade. |
unsigned long gameplay::AnimationClip::getActiveDuration | ( | ) | const |
Gets the AnimationClip's active duration.
Animation* gameplay::AnimationClip::getAnimation | ( | ) | const |
Gets the Animation that this AnimationClip was created from.
float gameplay::AnimationClip::getBlendWeight | ( | ) | const |
Gets the blend weight of the AnimationClip.
unsigned long gameplay::AnimationClip::getDuration | ( | ) | const |
Gets the AnimationClip's duration.
float gameplay::AnimationClip::getElapsedTime | ( | ) | const |
Gets the AnimationClip's elapsed time.
unsigned long gameplay::AnimationClip::getEndTime | ( | ) | const |
Gets the AnimationClip's end time.
const char* gameplay::AnimationClip::getId | ( | ) | const |
Gets the AnimationClip's ID.
float gameplay::AnimationClip::getLoopBlendTime | ( | ) | const |
Returns the amount of time (in milliseconds) spent blending the clip's end points when looping.
float gameplay::AnimationClip::getRepeatCount | ( | ) | const |
Gets the AnimationClip's repeat count.
float gameplay::AnimationClip::getSpeed | ( | ) | const |
Gets the AninimationClip's running speed.
unsigned long gameplay::AnimationClip::getStartTime | ( | ) | const |
Gets the AnimationClip's start time.
const char* gameplay::AnimationClip::getTypeName | ( | ) | const [virtual] |
Extends ScriptTarget::getTypeName() to return the type name of this class.
Implements gameplay::ScriptTarget.
bool gameplay::AnimationClip::isPlaying | ( | ) | const |
Checks if the AnimationClip is playing.
void gameplay::AnimationClip::pause | ( | ) |
Pauses the AnimationClip.
void gameplay::AnimationClip::play | ( | ) |
Plays the AnimationClip.
void gameplay::AnimationClip::removeBeginListener | ( | AnimationClip::Listener * | listener | ) |
Removes an animation begin listener.
listener | The listener to be removed. |
void gameplay::AnimationClip::removeEndListener | ( | AnimationClip::Listener * | listener | ) |
Removes an animation end listener.
listener | The listener to be removed. |
void gameplay::AnimationClip::removeListener | ( | AnimationClip::Listener * | listener, |
unsigned long | eventTime | ||
) |
Removes an animation listener assigned to the specified eventTime.
listener | The listener to be removed with the specified time. |
eventTime | The time of the listener to be removed. |
void gameplay::AnimationClip::setActiveDuration | ( | unsigned long | duration | ) |
Sets the AnimationClip's active duration. Overrides repeat count.
Use REPEAT_INDEFINITE to play the AnimationClip indefinitely.
duration | The active duration that is set on the AnimationClip, in milliseconds. |
void gameplay::AnimationClip::setBlendWeight | ( | float | blendWeight | ) |
Sets the blend weight of the AnimationClip.
blendWeight | The blend weight to apply to the clip. |
void gameplay::AnimationClip::setLoopBlendTime | ( | float | loopBlendTime | ) |
Sets the time (in milliseconds) to append to the clip's active duration to use for blending the end points of the clip when looping.
loopBlendTime | Time spent blending end points of clip when looping. |
void gameplay::AnimationClip::setRepeatCount | ( | float | repeatCount | ) |
Sets the AnimationClip's repeat count. Overrides repeat duration.
Use REPEAT_INDEFINITE to play the AnimationClip indefinitely.
repeatCount | The repeat count to set on the AnimationClip. |
void gameplay::AnimationClip::setSpeed | ( | float | speed | ) |
Set the AnimationClip's running speed.
speed | The clips running speed. |
void gameplay::AnimationClip::stop | ( | ) |
Stops the AnimationClip.
const unsigned int gameplay::AnimationClip::REPEAT_INDEFINITE = 0 [static] |
Defines a constant for indefinitely repeating an AnimationClip.