Panda3D
Classes | Public Types | Public Member Functions | List of all members
EggCharacterDb Class Reference

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

#include "eggCharacterDb.h"

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. More...
 
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. More...
 
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. More...
 

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 41 of file eggCharacterDb.h.

Constructor & Destructor Documentation

◆ EggCharacterDb()

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 25 of file eggCharacterDb.cxx.

Member Function Documentation

◆ get_matrix()

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 68 of file eggCharacterDb.cxx.

◆ set_matrix()

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 106 of file eggCharacterDb.cxx.


The documentation for this class was generated from the following files: