Panda3D
Classes | Public Types | Public Member Functions

EggCharacterDb Class Reference

This class is used during joint optimization or restructuring to store the table of interim joint computations. More...

#include "eggCharacterDb.h"

List of all members.

Classes

class  Key

Public Types

enum  TableType { TT_rebuild_frame, TT_net_frame, TT_net_frame_inv }

Public Member Functions

 EggCharacterDb ()
 Constructs a database for storing the interim work for the indicated EggCharacterData.
bool get_matrix (const EggJointPointer *joint, TableType type, int frame, LMatrix4d &mat) const
 Looks up the data for the indicated joint, type, and frame, and fills it in result (and returns true) if it is found.
void set_matrix (const EggJointPointer *joint, TableType type, int frame, const LMatrix4d &mat)
 Stores the matrix for the indicated joint, type, and frame in the database.

Detailed Description

This class is used during joint optimization or restructuring to store the table of interim joint computations.

That is to say, this class provides an temporary data store for three tables of matrices per each EggJointPointer per frame.

Definition at line 44 of file eggCharacterDb.h.


Constructor & Destructor Documentation

EggCharacterDb::EggCharacterDb ( )

Constructs a database for storing the interim work for the indicated EggCharacterData.

The parameter max_ram_mb indicates the maximum amount of RAM (in MB) that the database should consume; if it the database would roughly fit within this limit, it will be stored in RAM; otherwise, it will be written to disk (if Berkeley DB is available).

Definition at line 30 of file eggCharacterDb.cxx.


Member Function Documentation

bool EggCharacterDb::get_matrix ( const EggJointPointer joint,
TableType  type,
int  frame,
LMatrix4d mat 
) const

Looks up the data for the indicated joint, type, and frame, and fills it in result (and returns true) if it is found.

Returns false if this data has not been stored in the database.

Definition at line 78 of file eggCharacterDb.cxx.

Referenced by EggMatrixTablePointer::do_rebuild(), EggJointNodePointer::do_rebuild(), EggJointData::get_net_frame(), and EggJointData::get_net_frame_inv().

void EggCharacterDb::set_matrix ( const EggJointPointer joint,
TableType  type,
int  frame,
const LMatrix4d mat 
)

Stores the matrix for the indicated joint, type, and frame in the database.

It is an error to call this more than once for any given key combination (not for any technical reason, but because we don't expect this to happen).

Definition at line 120 of file eggCharacterDb.cxx.

Referenced by EggJointData::do_compute_reparent(), EggJointData::get_net_frame(), EggJointData::get_net_frame_inv(), EggRetargetAnim::retarget_anim(), and EggTopstrip::strip_anim().


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