14#ifndef ANIMCONTROLCOLLECTION_H
15#define ANIMCONTROLCOLLECTION_H
53 INLINE
bool play(
const std::string &anim_name);
54 INLINE
bool play(
const std::string &anim_name,
double from,
double to);
55 INLINE
bool loop(
const std::string &anim_name,
bool restart);
56 INLINE
bool loop(
const std::string &anim_name,
bool restart,
double from,
double to);
57 INLINE
bool stop(
const std::string &anim_name);
58 INLINE
bool pose(
const std::string &anim_name,
double frame);
62 void play_all(
double from,
double to);
64 void loop_all(
bool restart,
double from,
double to);
68 INLINE
int get_frame(
const std::string &anim_name)
const;
74 INLINE
bool is_playing(
const std::string &anim_name)
const;
79 void output(std::ostream &out)
const;
80 void write(std::ostream &out)
const;
88 typedef pvector<ControlDef> Controls;
91 typedef pmap<std::string, size_t> ControlsByName;
92 ControlsByName _controls_by_name;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a named collection of AnimControl pointers.
get_num_anims
Returns the number of AnimControls associated with this collection.
bool play(const std::string &anim_name)
Starts the named animation playing.
get_anim
Returns the nth AnimControl associated with this collection.
bool stop_all()
Stops all currently playing animations.
bool stop(const std::string &anim_name)
Stops the named animation.
void loop_all(bool restart)
Starts all animations looping.
int get_num_frames(const std::string &anim_name) const
Returns the total number of frames in the named animation, or 0 if the animation is not found.
bool is_playing(const std::string &anim_name) const
Returns true if the named animation is currently playing, false otherwise.
void clear_anims()
Disassociates all anims from this collection.
bool loop(const std::string &anim_name, bool restart)
Starts the named animation looping.
AnimControlCollection()
Returns the AnimControl associated with the given name, or NULL if no such control has been associate...
bool pose(const std::string &anim_name, double frame)
Sets to a particular frame in the named animation.
AnimControl * find_anim(const std::string &name) const
Returns the AnimControl associated with the given name, or NULL if no such control has been associate...
void store_anim(AnimControl *control, const std::string &name)
Associates the given AnimControl with this collection under the given name.
std::string which_anim_playing() const
Returns the name of the bound AnimControl currently playing, if any.
void pose_all(double frame)
Sets all animations to the indicated frame.
get_anim_name
Returns the name of the nth AnimControl associated with this collection.
int get_frame(const std::string &anim_name) const
Returns the current frame in the named animation, or 0 if the animation is not found.
bool unbind_anim(const std::string &name)
Removes the AnimControl associated with the given name, if any.
void play_all()
Starts all animations playing.
Controls the timing of a character animation.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.