Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
AnimPreloadTable Class Reference

This table records data about a list of animations for a particular model, such as number of frames and frame rate. More...

Inheritance diagram for AnimPreloadTable:
CopyOnWriteObject CachedTypedWritableReferenceCount TypedWritableReferenceCount TypedWritable ReferenceCount TypedObject

List of all members.

Public Member Functions

 AnimPreloadTable ()
 addAnim (string basename, float base_frame_rate, int num_frames)
 Adds a new animation record to the table.
 addAnimsFrom (AnimPreloadTable const other)
 Copies the animation records from the other table into this one.
 clearAnims ()
 Removes all animation records from the table.
int findAnim (string basename)
 Returns the index number in the table of the animation record with the indicated name, or -1 if the name is not present.
float getBaseFrameRate (int n)
 Returns the frame rate stored for the nth animation record.
string getBasename (int n)
 Returns the basename stored for the nth animation record.
int getNumAnims ()
 Returns the number of animation records in the table.
int getNumFrames (int n)
 Returns the number of frames stored for the nth animation record.
 output (ostream out)
 removeAnim (int n)
 Removes the nth animation records from the table.
 write (ostream out, int indent_level)

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

This table records data about a list of animations for a particular model, such as number of frames and frame rate.

It's used for implementating asynchronous binding.

This table is normally built by an offline tool, such as egg-optchar.


Constructor & Destructor Documentation


Member Function Documentation

addAnim ( string  basename,
float  base_frame_rate,
int  num_frames 
)

Adds a new animation record to the table.

If there is already a record of this name, no operation is performed (the original record is unchanged). See find_anim(). This will invalidate existing index numbers.

addAnimsFrom ( AnimPreloadTable const  other)

Copies the animation records from the other table into this one.

If a given record name exists in both tables, the record in this one supercedes.

Removes all animation records from the table.

int findAnim ( string  basename)

Returns the index number in the table of the animation record with the indicated name, or -1 if the name is not present.

By convention, the basename is the filename of the egg or bam file, without the directory part and without the extension. That is, it is Filename::get_basename_wo_extension().

float getBaseFrameRate ( int  n)

Returns the frame rate stored for the nth animation record.

string getBasename ( int  n)

Returns the basename stored for the nth animation record.

See find_anim().

static TypeHandle getClassType ( ) [static]

Reimplemented from CopyOnWriteObject.

Returns the number of animation records in the table.

Returns the number of frames stored for the nth animation record.

output ( ostream  out)
removeAnim ( int  n)

Removes the nth animation records from the table.

This renumbers indexes for following animations.

write ( ostream  out,
int  indent_level 
)
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties