Panda3D
|
Parent class for all animation channels. More...
#include "animChannelBase.h"
Public Member Functions | |
AnimChannelBase (AnimGroup *parent, const string &name) | |
This is the normal constructor, which automatically places the AnimChannel in the previously-created hierarchy. | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
virtual TypeHandle | get_value_type () const =0 |
Returns the TypeHandle associated with the ValueType we are concerned with. | |
virtual bool | has_changed (int last_frame, double last_frac, int this_frame, double this_frac) |
Returns true if the value has changed since the last call to has_changed(). | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Protected Member Functions | |
AnimChannelBase (const string &name="") | |
Don't use this constructor. | |
AnimChannelBase (AnimGroup *parent, const AnimChannelBase ©) | |
Creates a new AnimChannelBase, just like this one, without copying any children. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place. | |
Protected Attributes | |
int | _last_frame |
Parent class for all animation channels.
An AnimChannel is an arbitrary function that changes over time (actually, over frames), usually defined by a table read from an egg file (but possibly computed or generated in any other way).
Definition at line 33 of file animChannelBase.h.
AnimChannelBase::AnimChannelBase | ( | const string & | name = "" | ) | [inline, protected] |
Don't use this constructor.
It exists only so that AnimChannelFixed may define itself outside of the hierarchy. Normally, an AnimChannel must be created as part of a hierarchy.
Definition at line 24 of file animChannelBase.I.
AnimChannelBase::AnimChannelBase | ( | AnimGroup * | parent, |
const AnimChannelBase & | copy | ||
) | [inline, protected] |
Creates a new AnimChannelBase, just like this one, without copying any children.
The new copy is added to the indicated parent. Intended to be called by make_copy() only.
Definition at line 39 of file animChannelBase.I.
AnimChannelBase::AnimChannelBase | ( | AnimGroup * | parent, |
const string & | name | ||
) | [inline] |
This is the normal constructor, which automatically places the AnimChannel in the previously-created hierarchy.
Definition at line 53 of file animChannelBase.I.
void AnimChannelBase::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.
Reimplemented from AnimGroup.
Reimplemented in AnimChannelMatrixXfmTable, AnimChannelMatrixDynamic, AnimChannelScalarDynamic, AnimChannelScalarTable, and AnimChannelMatrixFixed.
Definition at line 61 of file animChannelBase.cxx.
References DatagramIterator::get_uint16().
virtual TypeHandle AnimChannelBase::get_value_type | ( | ) | const [pure virtual] |
Returns the TypeHandle associated with the ValueType we are concerned with.
This is provided to allow a bit of run-time checking that joints and channels are matching properly in type.
Reimplemented from AnimGroup.
Implemented in AnimChannel< SwitchType >, and AnimChannel< ACMatrixSwitchType >.
bool AnimChannelBase::has_changed | ( | int | last_frame, |
double | last_frac, | ||
int | this_frame, | ||
double | this_frac | ||
) | [virtual] |
Returns true if the value has changed since the last call to has_changed().
last_frame is the frame number of the last call; this_frame is the current frame number. last_frac and this_frac are the fractional steps into those frames, which will be 0.0 unless we are running in frame_blend mode.
Reimplemented in AnimChannelMatrixDynamic, AnimChannelScalarDynamic, AnimChannelMatrixXfmTable, AnimChannelFixed< SwitchType >, AnimChannelScalarTable, and AnimChannelMatrixFixed.
Definition at line 36 of file animChannelBase.cxx.
Referenced by AnimControl::channel_has_changed().
void AnimChannelBase::write_datagram | ( | BamWriter * | manager, |
Datagram & | me | ||
) | [virtual] |
Function to write the important information in the particular object to a Datagram.
Reimplemented from AnimGroup.
Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, and AnimChannelMatrixFixed.
Definition at line 47 of file animChannelBase.cxx.
References Datagram::add_uint16().