Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions

AnimBundle Class Reference

This is the root of an AnimChannel hierarchy. More...

#include "animBundle.h"

Inheritance diagram for AnimBundle:
AnimGroup TypedWritableReferenceCount Namable TypedWritable ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 AnimBundle (const string &name, PN_stdfloat fps, int num_frames)
virtual TypeHandle force_init_type ()
double get_base_frame_rate () const
 Returns the ideal number of frames per second of the animation, when it is running at normal speed.
int get_num_frames () const
 Returns the number of frames of animation, or 0 if the animation has no fixed number of frames.
virtual TypeHandle get_type () const
virtual void output (ostream &out) const
 Writes a one-line description of the bundle.
 PT (AnimBundle) copy_bundle() const
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 ()
static TypedWritablemake_AnimBundle (const FactoryParams &params)
 Factory method to generate a AnimBundle object.
static void register_with_read_factory ()
 Factory method to generate a AnimBundle object.

Protected Member Functions

 AnimBundle (AnimGroup *parent, const AnimBundle &copy)
 Creates a new AnimBundle, 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.
virtual AnimGroupmake_copy (AnimGroup *parent) const
 Returns a copy of this object, and attaches it to the indicated parent (which may be NULL only if this is an AnimBundle).

Detailed Description

This is the root of an AnimChannel hierarchy.

It knows the frame rate and number of frames of all the channels in the hierarchy (which must all match).

Definition at line 31 of file animBundle.h.


Constructor & Destructor Documentation

AnimBundle::AnimBundle ( AnimGroup parent,
const AnimBundle copy 
) [protected]

Creates a new AnimBundle, 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 35 of file animBundle.cxx.


Member Function Documentation

void AnimBundle::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.

Definition at line 105 of file animBundle.cxx.

References DatagramIterator::get_stdfloat(), and DatagramIterator::get_uint16().

Referenced by make_AnimBundle().

double AnimBundle::get_base_frame_rate ( ) const [inline]

Returns the ideal number of frames per second of the animation, when it is running at normal speed.

This may not be the same as the actual playing frame rate, as it might have been adjusted through set_play_rate() on the AnimControl object. See AnimControl::get_effective_frame_rate().

Definition at line 47 of file animBundle.I.

int AnimBundle::get_num_frames ( ) const [inline]

Returns the number of frames of animation, or 0 if the animation has no fixed number of frames.

Definition at line 58 of file animBundle.I.

Referenced by AnimChannelScalarTable::set_table(), and AnimChannelMatrixXfmTable::set_table().

TypedWritable * AnimBundle::make_AnimBundle ( const FactoryParams params) [static]

Factory method to generate a AnimBundle object.

Definition at line 117 of file animBundle.cxx.

References fillin().

Referenced by register_with_read_factory().

AnimGroup * AnimBundle::make_copy ( AnimGroup parent) const [protected, virtual]

Returns a copy of this object, and attaches it to the indicated parent (which may be NULL only if this is an AnimBundle).

Intended to be called by copy_subtree() only.

Reimplemented from AnimGroup.

Definition at line 79 of file animBundle.cxx.

void AnimBundle::output ( ostream &  out) const [virtual]

Writes a one-line description of the bundle.

Reimplemented from AnimGroup.

Definition at line 65 of file animBundle.cxx.

void AnimBundle::register_with_read_factory ( ) [static]

Factory method to generate a AnimBundle object.

Reimplemented from AnimGroup.

Definition at line 133 of file animBundle.cxx.

References BamReader::get_factory(), make_AnimBundle(), and Factory< Type >::register_factory().

void AnimBundle::write_datagram ( BamWriter manager,
Datagram me 
) [virtual]

Function to write the important information in the particular object to a Datagram.

Reimplemented from AnimGroup.

Definition at line 90 of file animBundle.cxx.

References Datagram::add_stdfloat(), and Datagram::add_uint16().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations