This is a named collection of AnimControl pointers. More...
Public Member Functions | |
AnimControlCollection () | |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated. | |
clearAnims () | |
Disassociates all anims from this collection. | |
AnimControl | findAnim (string name) |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated. | |
AnimControl | getAnim (int n) |
Returns the nth AnimControl associated with this collection. | |
string | getAnimName (int n) |
Returns the name of the nth AnimControl associated with this collection. | |
list | getAnimNames () |
list | getAnims () |
int | getFrame () |
Returns the current frame in the last-started animation. | |
int | getFrame (string anim_name) |
Returns the current frame in the named animation, or 0 if the animation is not found. | |
int | getNumAnims () |
Returns the number of AnimControls associated with this collection. | |
int | getNumFrames () |
Returns the total number of frames in the last-started animation. | |
int | getNumFrames (string anim_name) |
Returns the total number of frames in the named animation, or 0 if the animation is not found. | |
bool | isPlaying () |
Returns true if the last-started animation is currently playing, false otherwise. | |
bool | isPlaying (string anim_name) |
Returns true if the named animation is currently playing, false otherwise. | |
bool | loop (string anim_name, bool restart) |
Starts the named animation looping. | |
bool | loop (string anim_name, bool restart, int from, int to) |
Starts the named animation looping. | |
loopAll (bool restart) | |
Starts all animations looping. | |
loopAll (bool restart, int from, int to) | |
Starts all animations looping. | |
output (ostream out) | |
bool | play (string anim_name) |
Starts the named animation playing. | |
bool | play (string anim_name, int from, int to) |
Starts the named animation playing. | |
playAll () | |
Starts all animations playing. | |
playAll (int from, int to) | |
Starts all animations playing. | |
bool | pose (string anim_name, int frame) |
Sets to a particular frame in the named animation. | |
poseAll (int frame) | |
Sets all animations to the indicated frame. | |
bool | stop (string anim_name) |
Stops the named animation. | |
bool | stopAll () |
Stops all currently playing animations. | |
storeAnim (AnimControl control, string name) | |
Associates the given AnimControl with this collection under the given name. | |
bool | unbindAnim (string name) |
Removes the AnimControl associated with the given name, if any. | |
string | whichAnimPlaying () |
Returns the name of the bound AnimControl currently playing, if any. | |
write (ostream out) |
This is a named collection of AnimControl pointers.
An AnimControl may be added to the collection by name. While an AnimControl is associated, its reference count is maintained; associating a new AnimControl with the same name will decrement the previous control's reference count (and possibly delete it, unbinding its animation).
Returns the AnimControl associated with the given name, or NULL if no such control has been associated.
clearAnims | ( | ) |
Disassociates all anims from this collection.
AnimControl findAnim | ( | string | name | ) |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated.
AnimControl getAnim | ( | int | n | ) |
Returns the nth AnimControl associated with this collection.
string getAnimName | ( | int | n | ) |
Returns the name of the nth AnimControl associated with this collection.
list getAnimNames | ( | ) |
list getAnims | ( | ) |
Returns the current frame in the named animation, or 0 if the animation is not found.
int getNumAnims | ( | ) |
Returns the number of AnimControls associated with this collection.
int getNumFrames | ( | ) |
Returns the total number of frames in the last-started animation.
int getNumFrames | ( | string | anim_name | ) |
Returns the total number of frames in the named animation, or 0 if the animation is not found.
bool isPlaying | ( | ) |
Returns true if the last-started animation is currently playing, false otherwise.
bool isPlaying | ( | string | anim_name | ) |
Returns true if the named animation is currently playing, false otherwise.
bool loop | ( | string | anim_name, |
bool | restart | ||
) |
Starts the named animation looping.
loopAll | ( | bool | restart | ) |
Starts all animations looping.
bool play | ( | string | anim_name | ) |
Starts the named animation playing.
playAll | ( | ) |
Starts all animations playing.
bool stop | ( | string | anim_name | ) |
Stops the named animation.
bool stopAll | ( | ) |
Stops all currently playing animations.
Returns true if any animations were stopped, false if none were playing.
storeAnim | ( | AnimControl | control, |
string | name | ||
) |
Associates the given AnimControl with this collection under the given name.
The AnimControl will remain associated until a new AnimControl is associated with the same name later, or until unbind_anim() is called with this name.
bool unbindAnim | ( | string | name | ) |
Removes the AnimControl associated with the given name, if any.
Returns true if an AnimControl was removed, false if there was no AnimControl with the indicated name.
string whichAnimPlaying | ( | ) |
Returns the name of the bound AnimControl currently playing, if any.
If more than one AnimControl is currently playing, returns all of the names separated by spaces.