#include <animChannelBase.h>
Inheritance diagram for AnimChannelBase:
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 bool | has_changed (int last_frame, int this_frame) |
Returns true if the value has changed since the last call to has_changed(). | |
virtual TypeHandle | get_value_type () const=0 |
Returns the TypeHandle associated with the ValueType we are concerned with. | |
virtual void | output (ostream &out) const |
Writes a one-line description of the channel. | |
virtual void | write_datagram (BamWriter *manager, Datagram &me) |
Function to write the important information in the particular object to a Datagram. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
int | get_num_children () const |
Returns the number of child nodes of the group. | |
AnimGroup * | get_child (int n) const |
Returns the nth child of the group. | |
AnimGroup * | find_child (const string &name) const |
Returns the first descendant found with the indicated name, or NULL if no such descendant exists. | |
void | sort_descendants () |
Sorts the children nodes at each level of the hierarchy into alphabetical order. | |
virtual void | write (ostream &out, int indent_level) const |
Writes a brief description of the group and all of its descendants. | |
virtual int | complete_pointers (TypedWritable **p_list, BamReader *manager) |
Takes in a vector of pointes to TypedWritable objects that correspond to all the requests for pointers that this object made to BamReader. | |
virtual void | finalize () |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. | |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
void | register_with_read_factory (void) |
Factory method to generate a AnimGroup object. | |
TypedWritable * | make_AnimGroup (const FactoryParams ¶ms) |
Factory method to generate a AnimGroup object. | |
Static Public Attributes | |
TypedWritable *const | Null = (TypedWritable*)0L |
Protected Types | |
typedef pvector< PointerTo< AnimGroup > > | Children |
Protected Member Functions | |
AnimChannelBase (const string &name="") | |
Don't use this constructor. | |
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. | |
void | write_descendants (ostream &out, int indent_level) const |
Writes a brief description of all of the group's descendants. | |
Protected Attributes | |
int | _last_frame |
Children | _children |
AnimBundle * | _root |
Static Private Attributes | |
TypeHandle | _type_handle |
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 47 of file animChannelBase.h.
|
Definition at line 78 of file animGroup.h. |
|
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 37 of file animChannelBase.I. References _last_frame, and INLINE. |
|
This is the normal constructor, which automatically places the AnimChannel in the previously-created hierarchy.
Definition at line 56 of file animChannelBase.I. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Takes in a vector of pointes to TypedWritable objects that correspond to all the requests for pointers that this object made to BamReader.
Reimplemented from TypedWritable. Definition at line 281 of file animGroup.cxx. |
|
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, and AnimChannelScalarTable. Definition at line 96 of file animChannelBase.cxx. |
|
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
Reimplemented in PartBundle, RenderAttrib, RenderEffect, RenderEffects, RenderState, and TransformState. Definition at line 112 of file typedWritable.cxx. Referenced by BamReader::skip_pointer(). |
|
Returns the first descendant found with the indicated name, or NULL if no such descendant exists.
Definition at line 99 of file animGroup.cxx. References TypeHandle::none(). |
|
Reimplemented from AnimGroup. Reimplemented in AnimChannel< SwitchType >, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Definition at line 78 of file animChannelBase.h. |
|
Returns the nth child of the group.
Definition at line 83 of file animGroup.cxx. References AnimGroup::_children. |
|
Reimplemented from AnimGroup. Reimplemented in AnimChannel< SwitchType >, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Definition at line 79 of file animChannelBase.h. |
|
|
Returns the number of child nodes of the group.
Definition at line 69 of file animGroup.cxx. References AnimGroup::_children, nassertr, and NULL. Referenced by PartGroup::sort_descendants(). |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Reimplemented from AnimGroup. Reimplemented in AnimChannel< SwitchType >, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Definition at line 75 of file animChannelBase.h. Referenced by has_changed(). |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
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 >, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Referenced by has_changed(). |
|
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. Reimplemented in AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, and AnimChannelScalarTable. Definition at line 47 of file animChannelBase.cxx. References Namable::get_name(), get_type(), and get_value_type(). |
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture(). |
|
Reimplemented from AnimGroup. Reimplemented in AnimChannel< SwitchType >, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Definition at line 82 of file animChannelBase.h. Referenced by AnimChannel< ACMatrixSwitchType >::get_type(). |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
|
Factory method to generate a AnimGroup object.
Definition at line 309 of file animGroup.cxx. |
|
Writes a one-line description of the channel.
Reimplemented from AnimGroup. Reimplemented in AnimChannelFixed< SwitchType >. Definition at line 60 of file animChannelBase.cxx. References _last_frame, Datagram::add_uint16(), and AnimGroup::write_datagram(). |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Factory method to generate a AnimGroup object.
Reimplemented in AnimBundle, AnimChannelMatrixXfmTable, and AnimChannelScalarTable. Definition at line 329 of file animGroup.cxx. |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture(). |
|
Sorts the children nodes at each level of the hierarchy into alphabetical order. This should be done after creating the hierarchy, to guarantee that the correct names will match up together when the AnimBundle is later bound to a PlayerRoot. Definition at line 160 of file animGroup.cxx. |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
Writes a brief description of the group and all of its descendants.
Reimplemented in AnimChannelMatrixXfmTable, and AnimChannelScalarTable. Definition at line 194 of file animGroup.cxx. |
|
Function to write the important information in the particular object to a Datagram.
Reimplemented from AnimGroup. Reimplemented in AnimChannelMatrixXfmTable, and AnimChannelScalarTable. Definition at line 75 of file animChannelBase.cxx. References _last_frame, AnimGroup::fillin(), and DatagramIterator::get_uint16(). |
|
Writes a brief description of all of the group's descendants.
Definition at line 211 of file animGroup.cxx. References BamReader::read_pointer(). Referenced by AnimChannelScalarTable::set_table(). |
|
Definition at line 79 of file animGroup.h. Referenced by AnimGroup::AnimGroup(), AnimGroup::get_child(), AnimGroup::get_num_children(), AnimGroup::get_value_type(), AnimGroup::output(), and AnimChannelScalarTable::set_table(). |
|
Definition at line 65 of file animChannelBase.h. Referenced by AnimChannelBase(), output(), and write_datagram(). |
|
Definition at line 80 of file animGroup.h. Referenced by AnimChannelMatrixXfmTable::get_scale(), and AnimChannelScalarTable::get_value(). |
|
Reimplemented from AnimGroup. Reimplemented in AnimChannel< SwitchType >, AnimChannelFixed< SwitchType >, AnimChannelMatrixXfmTable, AnimChannelScalarTable, AnimChannel< ACScalarSwitchType >, and AnimChannel< ACMatrixSwitchType >. Definition at line 29 of file animChannelBase.cxx. |
|
Definition at line 25 of file typedWritable.cxx. Referenced by Child::complete_pointers(), Parent::complete_pointers(), Person::complete_pointers(), LoaderFileTypeBam::get_extension(), PartGroup::pick_channel_index(), BamReader::read_pointer(), and AnimGroup::write_datagram(). |