22 play(
const string &anim_name) {
27 _last_started_control = control;
38 play(
const string &anim_name,
int from,
int to) {
43 _last_started_control = control;
44 control->
play(from, to);
54 loop(
const string &anim_name,
bool restart) {
59 _last_started_control = control;
60 control->
loop(restart);
70 loop(
const string &anim_name,
bool restart,
int from,
int to) {
75 _last_started_control = control;
76 control->
loop(restart, from, to);
86 stop(
const string &anim_name) {
102 pose(
const string &anim_name,
int frame) {
107 _last_started_control = control;
108 control->
pose(frame);
135 if (_last_started_control == (
AnimControl *)NULL) {
138 return _last_started_control->
get_frame();
164 if (_last_started_control == (
AnimControl *)NULL) {
193 if (_last_started_control == (
AnimControl *)NULL) {
201 collection.output(out);
AnimControl * find_anim(const string &name) const
Returns the AnimControl associated with the given name, or NULL if no such control has been associate...
int get_num_frames() const
Returns the total number of frames in the last-started animation.
bool pose(const string &anim_name, int frame)
Sets to a particular frame in the named animation.
void loop(bool restart)
Starts the entire animation looping.
virtual int get_num_frames() const
Returns the number of frames in the animation.
void stop()
Stops a currently playing or looping animation right where it is.
int get_frame() const
Returns the current integer frame number.
bool stop(const string &anim_name)
Stops the named animation.
bool is_playing() const
Returns true if the animation is currently playing, false if it is stopped (e.g.
This is a named collection of AnimControl pointers.
bool loop(const string &anim_name, bool restart)
Starts the named animation looping.
bool is_playing() const
Returns true if the last-started animation is currently playing, false otherwise. ...
void pose(double frame)
Sets the animation to the indicated frame and holds it there.
Controls the timing of a character animation.
void play()
Runs the entire animation from beginning to end and stops.
int get_frame() const
Returns the current frame in the last-started animation.
bool play(const string &anim_name)
Starts the named animation playing.