|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

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

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:

List of all members.

## 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

## Detailed Description

Defines the runtime session of an Animation to be played.

## Member Function Documentation

void gameplay::AnimationClip::addBeginListener | ( | AnimationClip::Listener * | listener | ) |

Adds an animation begin listener.

Parameters:

  listener | The listener to be called when an AnimationClip begins.

void gameplay::AnimationClip::addEndListener | ( | AnimationClip::Listener * | listener | ) |

Adds an animation end listener.

Parameters:

  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.

Parameters:

  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.

Parameters:

  clip | The clip to fade into.
  duration | The duration of the fade.

unsigned long gameplay::AnimationClip::getActiveDuration | ( |  | ) | const

Gets the AnimationClip's active duration.

Returns:
  the AnimationClip's active duration.

Animation* gameplay::AnimationClip::getAnimation | ( |  | ) | const

Gets the Animation that this AnimationClip was created from.

Returns:
  The Animation that this clip was created from.

float gameplay::AnimationClip::getBlendWeight | ( |  | ) | const

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.

float gameplay::AnimationClip::getElapsedTime | ( |  | ) | const

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.

float gameplay::AnimationClip::getLoopBlendTime | ( |  | ) | const

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.

float gameplay::AnimationClip::getRepeatCount | ( |  | ) | const

Gets the AnimationClip's repeat count.

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

float gameplay::AnimationClip::getSpeed | ( |  | ) | const

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.

bool gameplay::AnimationClip::isPlaying | ( |  | ) | const

Checks if the AnimationClip is playing.

Returns:
  true if the AnimationClip is playing; false if the AnimationClip is not 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.

Parameters:

  listener | The listener to be removed.

void gameplay::AnimationClip::removeEndListener | ( | AnimationClip::Listener * | listener | ) |

Removes an animation end listener.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  repeatCount | The repeat count to set on the AnimationClip.

void gameplay::AnimationClip::setSpeed | ( | float | speed | ) |

Set the AnimationClip's running speed.

Parameters:

  speed | The clips running speed.

void gameplay::AnimationClip::stop | ( |  | ) |

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