Controls the timing of a character animation. An AnimControl object is created for each character/bundle binding and manages the state of the animation: whether started, stopped, or looping, and the current frame number and play rate.
PandaNode *get_anim_model(void) const
BitArray const &get_bound_joints(void) const
Returns the subset of joints controlled by this
AnimControl. Most of the time, this will be
BitArray::all_on(), for a normal full-body animation. For a subset animation, however, this will be just a subset of those bits, corresponding to the set of joints and sliders actually bound (as enumerated by bind_hierarchy() in depth-first LIFO order).
int get_channel_index(void) const
It will be true that get_part()->find_child(“n”)->get_bound(get_channel_index()) == get_anim()->find_child(“n”), for each joint “n”.
std::string get_pending_done_event(void) const
Returns the event name that will be thrown when the
AnimControlis finished binding asynchronously.
bool has_anim(void) const
bool is_pending(void) const
Returns true if the
AnimControlis being bound asynchronously, and has not yet finished. If this is true, the AnimControl’s interface is still available and will be perfectly useful (though
get_anim()might return NULL), but nothing visible will happen immediately.
virtual void output(std::ostream &out) const
void set_anim_model(PandaNode *model)
Associates the indicated
AnimControl. By convention, this node represents the root node of the model file that corresponds to this AnimControl’s animation file, though nothing in this code makes this assumption or indeed does anything with this node.
The purpose of this is simply to allow the
AnimControlto keep a reference count on the
ModelRootnode that generated it, so that the model will not disappear from the model pool until it is no longer referenced.
void set_pending_done_event(std::string const &done_event)
- PandaNode *get_anim_model(void) const