overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | Static Public Attributes
gameplay::AnimationClip Class Reference

#include <AnimationClip.h>

Inheritance diagram for gameplay::AnimationClip:
gameplay::Ref gameplay::ScriptTarget

List of all members.

Classes

class  Listener
struct  ListenerEvent

Public Member Functions

const char * getTypeName () const
const char * getId () const
AnimationgetAnimation () 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

Detailed Description

Defines the runtime session of an Animation to be played.


Member Function Documentation

Adds an animation begin listener.

Parameters:
listenerThe listener to be called when an AnimationClip begins.

Adds an animation end listener.

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

Parameters:
listenerThe listener to be called when the AnimationClip reaches the specified time in its playback.
eventTimeThe 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.

Parameters:
clipThe clip to fade into.
durationThe duration of the fade.

Gets the AnimationClip's active duration.

Returns:
the AnimationClip's active duration.

Gets the Animation that this AnimationClip was created from.

Returns:
The Animation that this clip was created from.

Gets the blend weight of the AnimationClip.

Returns:
The blendweight of the AnimationClip.
unsigned long gameplay::AnimationClip::getDuration ( ) const

Gets the AnimationClip's duration.

Returns:
the AnimationClip's duration, in milliseconds.

Gets the AnimationClip's elapsed time.

Returns:
The elapsed time of the AnimationClip (in milliseconds).
unsigned long gameplay::AnimationClip::getEndTime ( ) const

Gets the AnimationClip's end time.

Returns:
The time (in milliseconds) that the AnimationClip will end.
const char* gameplay::AnimationClip::getId ( ) const

Gets the AnimationClip's ID.

Returns:
The AnimationClip's ID.

Returns the amount of time (in milliseconds) spent blending the clip's end points when looping.

Returns:
Time spent blending end points of the clip when looping.

Gets the AnimationClip's repeat count.

Returns:
The repeat count that is set on the AnimationClip.

Gets the AninimationClip's running speed.

Returns:
The AninimationClip's running speed.
unsigned long gameplay::AnimationClip::getStartTime ( ) const

Gets the AnimationClip's start time.

Returns:
The time (in milliseconds) that the AnimationClip starts playing from.
const char* gameplay::AnimationClip::getTypeName ( ) const [virtual]

Extends ScriptTarget::getTypeName() to return the type name of this class.

Returns:
The type name of this class: "AnimationClip"
See also:
ScriptTarget::getTypeName()

Implements gameplay::ScriptTarget.

Checks if the AnimationClip is playing.

Returns:
true if the AnimationClip is playing; false if the AnimationClip is not playing.

Pauses the AnimationClip.

Plays the AnimationClip.

Removes an animation begin listener.

Parameters:
listenerThe listener to be removed.

Removes an animation end listener.

Parameters:
listenerThe listener to be removed.
void gameplay::AnimationClip::removeListener ( AnimationClip::Listener listener,
unsigned long  eventTime 
)

Removes an animation listener assigned to the specified eventTime.

Parameters:
listenerThe listener to be removed with the specified time.
eventTimeThe 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.

Parameters:
durationThe active duration that is set on the AnimationClip, in milliseconds.
void gameplay::AnimationClip::setBlendWeight ( float  blendWeight)

Sets the blend weight of the AnimationClip.

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

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

Parameters:
repeatCountThe repeat count to set on the AnimationClip.
void gameplay::AnimationClip::setSpeed ( float  speed)

Set the AnimationClip's running speed.

Parameters:
speedThe clips running speed.

Stops the AnimationClip.


Member Data Documentation

const unsigned int gameplay::AnimationClip::REPEAT_INDEFINITE = 0 [static]

Defines a constant for indefinitely repeating an AnimationClip.

 All Classes Functions Variables Typedefs Enumerations Enumerator