Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EggJointPointer Class Reference

This is a base class for EggJointNodePointer and EggMatrixTablePointer. More...

#include <eggJointPointer.h>

Inheritance diagram for EggJointPointer:

EggBackPointer TypedObject EggJointNodePointer EggMatrixTablePointer List of all members.

Public Member Functions

virtual int get_num_frames () const=0
virtual LMatrix4d get_frame (int n) const=0
virtual void set_frame (int n, const LMatrix4d &mat)=0
virtual bool add_frame (const LMatrix4d &mat)
 Appends a new frame onto the end of the data, if possible; returns true if not possible, or false otherwise (e.g.

void begin_rebuild ()
 Resets the set of rebuild frames in preparation for rebuilding the complete table of frames.

virtual bool add_rebuild_frame (const LMatrix4d &mat)
 Adds a new frame to the set of rebuild frames.

virtual bool do_rebuild ()
 Rebuilds the entire table all at once, based on the frames added by repeated calls to add_rebuild_frame() since the last call to begin_rebuild().

virtual void optimize ()
 Resets the table before writing to disk so that redundant rows (e.g.

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
int get_type_index () const
bool is_of_type (TypeHandle handle) const
bool is_exact_type (TypeHandle handle) const

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Types

typedef pvector< LMatrix4d > RebuildFrames

Protected Attributes

RebuildFrames _rebuild_frames

Static Private Attributes

TypeHandle _type_handle

Detailed Description

This is a base class for EggJointNodePointer and EggMatrixTablePointer.

It stores a back pointer to either a entry or an xform
, and thus presents an interface that returns 1-n matrices, one for each frame. ( entries, for model files, appear the same as one-frame animations.)

Definition at line 48 of file eggJointPointer.h.


Member Typedef Documentation

typedef pvector<LMatrix4d> EggJointPointer::RebuildFrames [protected]
 

Definition at line 62 of file eggJointPointer.h.


Member Function Documentation

bool EggJointPointer::add_frame const LMatrix4d &  mat  )  [virtual]
 

Appends a new frame onto the end of the data, if possible; returns true if not possible, or false otherwise (e.g.

for a static joint).

Reimplemented in EggMatrixTablePointer.

Definition at line 41 of file eggJointPointer.cxx.

References _rebuild_frames.

bool EggJointPointer::add_rebuild_frame const LMatrix4d &  mat  )  [virtual]
 

Adds a new frame to the set of rebuild frames.

See begin_rebuild() and do_rebuild(). Returns true if this is valid, false otherwise (e.g. adding multiple frames to a static joint).

Reimplemented in EggJointNodePointer.

Definition at line 83 of file eggJointPointer.cxx.

Referenced by EggJointNodePointer::get_frame().

void EggJointPointer::begin_rebuild  ) 
 

Resets the set of rebuild frames in preparation for rebuilding the complete table of frames.

Repeated calls to add_rebuild_frame() will build up the frames without changing the values returned by get_frame(); the table will eventually be updated when do_rebuild is called.

Definition at line 64 of file eggJointPointer.cxx.

bool EggJointPointer::do_rebuild  )  [virtual]
 

Rebuilds the entire table all at once, based on the frames added by repeated calls to add_rebuild_frame() since the last call to begin_rebuild().

Until do_rebuild() is called, the animation table is not changed.

The return value is true if all frames are acceptable, or false if there is some problem.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 113 of file eggJointPointer.cxx.

virtual TypeHandle EggJointPointer::force_init_type void   )  [inline, virtual]
 

Reimplemented from EggBackPointer.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 77 of file eggJointPointer.h.

TypeHandle EggJointPointer::get_class_type void   )  [inline, static]
 

Reimplemented from EggBackPointer.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 66 of file eggJointPointer.h.

References init_type().

virtual LMatrix4d EggJointPointer::get_frame int  n  )  const [pure virtual]
 

Implemented in EggJointNodePointer, and EggMatrixTablePointer.

Referenced by EggJointData::get_num_frames().

virtual int EggJointPointer::get_num_frames  )  const [pure virtual]
 

Implemented in EggJointNodePointer, and EggMatrixTablePointer.

virtual TypeHandle EggJointPointer::get_type void   )  const [inline, virtual]
 

Reimplemented from EggBackPointer.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 74 of file eggJointPointer.h.

void EggJointPointer::init_type void   )  [inline, static]
 

Reimplemented from EggBackPointer.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 69 of file eggJointPointer.h.

References _type_handle.

Referenced by ConfigureFn(), and get_class_type().

void EggJointPointer::optimize  )  [virtual]
 

Resets the table before writing to disk so that redundant rows (e.g.

i { 1 1 1 1 1 1 1 1 }) are collapsed out.

Reimplemented in EggMatrixTablePointer.

Definition at line 134 of file eggJointPointer.cxx.

Referenced by EggJointData::do_rebuild().

virtual void EggJointPointer::set_frame int  n,
const LMatrix4d &  mat
[pure virtual]
 

Implemented in EggJointNodePointer, and EggMatrixTablePointer.


Member Data Documentation

RebuildFrames EggJointPointer::_rebuild_frames [protected]
 

Definition at line 63 of file eggJointPointer.h.

Referenced by EggMatrixTablePointer::add_frame(), add_frame(), EggJointNodePointer::get_frame(), and EggJointNodePointer::set_frame().

TypeHandle EggJointPointer::_type_handle [static, private]
 

Reimplemented from EggBackPointer.

Reimplemented in EggJointNodePointer, and EggMatrixTablePointer.

Definition at line 25 of file eggJointPointer.cxx.

Referenced by init_type().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:26:16 2003 for Panda-Tool by doxygen1.3