Panda3D
|
This is a named collection of AnimControl pointers. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ () | |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated. More... | |
__init__ (const AnimControlCollection) | |
clearAnims () | |
Disassociates all anims from this collection. More... | |
AnimControl | findAnim (str name) |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated. More... | |
AnimControl | getAnim (int n) |
Returns the nth AnimControl associated with this collection. More... | |
str | getAnimName (int n) |
Returns the name of the nth AnimControl associated with this collection. More... | |
list | getAnimNames () |
list | getAnims () |
int | getFrame () |
Returns the current frame in the last-started animation. More... | |
int | getFrame (str anim_name) |
Returns the current frame in the named animation, or 0 if the animation is not found. More... | |
int | getNumAnims () |
Returns the number of AnimControls associated with this collection. More... | |
int | getNumFrames () |
Returns the total number of frames in the last-started animation. More... | |
int | getNumFrames (str anim_name) |
Returns the total number of frames in the named animation, or 0 if the animation is not found. More... | |
bool | isPlaying () |
Returns true if the last-started animation is currently playing, false otherwise. More... | |
bool | isPlaying (str anim_name) |
Returns true if the named animation is currently playing, false otherwise. More... | |
bool | loop (str anim_name, bool restart) |
Starts the named animation looping. More... | |
bool | loop (str anim_name, bool restart, double from, double to) |
Starts the named animation looping. More... | |
loopAll (bool restart) | |
Starts all animations looping. More... | |
loopAll (bool restart, double from, double to) | |
Starts all animations looping. More... | |
output (Ostream out) | |
bool | play (str anim_name) |
Starts the named animation playing. More... | |
bool | play (str anim_name, double from, double to) |
Starts the named animation playing. More... | |
playAll () | |
playAll (double from, double to) | |
Starts all animations playing. More... | |
bool | pose (str anim_name, double frame) |
Sets to a particular frame in the named animation. More... | |
poseAll (double frame) | |
Sets all animations to the indicated frame. More... | |
bool | stop (str anim_name) |
Stops the named animation. More... | |
bool | stopAll () |
Stops all currently playing animations. More... | |
storeAnim (AnimControl control, str name) | |
Associates the given AnimControl with this collection under the given name. More... | |
bool | unbindAnim (str name) |
Removes the AnimControl associated with the given name, if any. More... | |
str | whichAnimPlaying () |
Returns the name of the bound AnimControl currently playing, if any. More... | |
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).
__init__ | ( | ) |
Returns the AnimControl associated with the given name, or NULL if no such control has been associated.
__init__ | ( | const | AnimControlCollection | ) |
clearAnims | ( | ) |
Disassociates all anims from this collection.
AnimControl findAnim | ( | str | 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.
str 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 | ( | str | 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 | ( | str | 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 | ( | str | anim_name | ) |
Returns true if the named animation is currently playing, false otherwise.
bool loop | ( | str | anim_name, |
bool | restart | ||
) |
Starts the named animation looping.
bool loop | ( | str | anim_name, |
bool | restart, | ||
double | from, | ||
double | to | ||
) |
Starts the named animation looping.
loopAll | ( | bool | restart | ) |
Starts all animations looping.
loopAll | ( | bool | restart, |
double | from, | ||
double | to | ||
) |
Starts all animations looping.
output | ( | Ostream | out | ) |
bool play | ( | str | anim_name | ) |
Starts the named animation playing.
bool play | ( | str | anim_name, |
double | from, | ||
double | to | ||
) |
Starts the named animation playing.
playAll | ( | ) |
playAll | ( | double | from, |
double | to | ||
) |
Starts all animations playing.
bool pose | ( | str | anim_name, |
double | frame | ||
) |
Sets to a particular frame in the named animation.
poseAll | ( | double | frame | ) |
Sets all animations to the indicated frame.
bool stop | ( | str | 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, |
str | 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 | ( | str | 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.
str 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.
write | ( | Ostream | out | ) |