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

EggMatrixTablePointer Class Reference

This stores a pointer back to an EggXfmSAnim table (i.e. More...

#include <eggMatrixTablePointer.h>

Inheritance diagram for EggMatrixTablePointer:

EggJointPointer EggBackPointer TypedObject List of all members.

Public Member Functions

 EggMatrixTablePointer (EggObject *object)
virtual int get_num_frames () const
 Returns the number of frames of animation for this particular joint.

virtual LMatrix4d get_frame (int n) const
 Returns the transform matrix corresponding to this joint position in the nth frame.

virtual void set_frame (int n, const LMatrix4d &mat)
 Sets the transform matrix corresponding to this joint position in the nth frame.

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.

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 ()
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.

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

Private Attributes

PointerTo< EggTable_table
PointerTo< EggXfmSAnim_xform

Static Private Attributes

TypeHandle _type_handle

Detailed Description

This stores a pointer back to an EggXfmSAnim table (i.e.

an <Xfm$Anim_S$> entry in an egg file), corresponding to the animation data from a single bundle for this joint.

Definition at line 46 of file eggMatrixTablePointer.h.


Member Typedef Documentation

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

Definition at line 62 of file eggJointPointer.h.


Constructor & Destructor Documentation

EggMatrixTablePointer::EggMatrixTablePointer EggObject object  ) 
 

Definition at line 38 of file eggMatrixTablePointer.cxx.

References _table, _xform, and EggGroupNode::iterator.


Member Function Documentation

bool EggMatrixTablePointer::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 from EggJointPointer.

Definition at line 139 of file eggMatrixTablePointer.cxx.

References EggJointPointer::_rebuild_frames, _xform, and NULL.

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

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  )  [inherited]
 

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 EggMatrixTablePointer::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 from EggJointPointer.

Definition at line 172 of file eggMatrixTablePointer.cxx.

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

Reimplemented from EggJointPointer.

Definition at line 75 of file eggMatrixTablePointer.h.

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

Reimplemented from EggJointPointer.

Definition at line 64 of file eggMatrixTablePointer.h.

LMatrix4d EggMatrixTablePointer::get_frame int  n  )  const [virtual]
 

Returns the transform matrix corresponding to this joint position in the nth frame.

Implements EggJointPointer.

Definition at line 97 of file eggMatrixTablePointer.cxx.

References _xform, get_num_frames(), and nassertv.

int EggMatrixTablePointer::get_num_frames  )  const [virtual]
 

Returns the number of frames of animation for this particular joint.

Implements EggJointPointer.

Definition at line 78 of file eggMatrixTablePointer.cxx.

References _xform, and nassertr.

Referenced by get_frame().

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

Reimplemented from EggJointPointer.

Definition at line 72 of file eggMatrixTablePointer.h.

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

Reimplemented from EggJointPointer.

Definition at line 67 of file eggMatrixTablePointer.h.

References _type_handle.

void EggMatrixTablePointer::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 from EggJointPointer.

Definition at line 206 of file eggMatrixTablePointer.cxx.

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

Sets the transform matrix corresponding to this joint position in the nth frame.

Implements EggJointPointer.

Definition at line 121 of file eggMatrixTablePointer.cxx.

References _xform.


Member Data Documentation

RebuildFrames EggJointPointer::_rebuild_frames [protected, inherited]
 

Definition at line 63 of file eggJointPointer.h.

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

PointerTo< EggTable > EggMatrixTablePointer::_table [private]
 

Definition at line 60 of file eggMatrixTablePointer.h.

Referenced by EggMatrixTablePointer().

TypeHandle EggMatrixTablePointer::_type_handle [static, private]
 

Reimplemented from EggJointPointer.

Definition at line 28 of file eggMatrixTablePointer.cxx.

Referenced by init_type().

PointerTo< EggXfmSAnim > EggMatrixTablePointer::_xform [private]
 

Definition at line 61 of file eggMatrixTablePointer.h.

Referenced by add_frame(), EggMatrixTablePointer(), get_frame(), get_num_frames(), and set_frame().


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