#include <eggCharacterData.h>
Inheritance diagram for EggCharacterData:
Public Member Functions | |
EggCharacterData (EggCharacterCollection *collection) | |
virtual | ~EggCharacterData () |
void | add_model (int model_index, EggNode *model_root) |
Indicates that the given model_index (with the indicated model_root) is associated with this character. | |
int | get_num_models () const |
Returns the total number of models associated with this character. | |
int | get_model_index (int n) const |
Returns the model_index of the nth model associated with this character. | |
EggNode * | get_model_root (int n) const |
Returns the model_root of the nth model associated with this character. | |
EggJointData * | get_root_joint () const |
Returns the root joint of the character hierarchy. | |
EggJointData * | find_joint (const string &name) const |
Returns the first joint found with the indicated name, or NULL if no joint has that name. | |
EggSliderData * | make_slider (const string &name) |
Returns the slider matching the indicated name. | |
virtual void | write (ostream &out, int indent_level=0) const |
void | set_name (const string &name) |
void | clear_name () |
bool | has_name () const |
const string & | get_name () const |
void | output (ostream &out) const |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Protected Types | |
typedef pvector< Model > | Models |
typedef pmap< string, EggSliderData * > | Sliders |
Protected Attributes | |
Models | _models |
EggCharacterCollection * | _collection |
EggJointData * | _root_joint |
Sliders | _sliders |
string | _name |
Static Protected Attributes | |
TypeHandle | _type_handle |
This contains a hierarchy of EggJointData nodes representing the skeleton, as well as a list of EggSliderData nodes representing the morph channels for the character.
This is very similar to the Character class from Panda, in that it's capable of associating skeleton-morph animation channels with models and calculating the vertex position for each frame. To some degree, it duplicates the functionality of Character. However, it differs in one fundamental principle: it is designed to be a non-real-time operation, working directly on the Egg structures as they are, instead of first boiling the Egg data into native Panda Geom tables for real-time animation. Because of this, it is (a) double-precision instead of single precision, (b) capable of generating modified Egg files, and (c) about a hundred times slower than the Panda Character class.
The data in this structure is normally filled in by the EggCharacterCollection class.
Definition at line 91 of file eggCharacterData.h.
|
Definition at line 114 of file eggCharacterData.h. |
|
Definition at line 120 of file eggCharacterData.h. |
|
Definition at line 37 of file eggCharacterData.cxx. References _root_joint, and _sliders. |
|
Definition at line 50 of file eggCharacterData.cxx. |
|
Indicates that the given model_index (with the indicated model_root) is associated with this character. This is normally called by the EggCharacterCollection class as new models are discovered. A "model" here is either a character model (or one LOD of a character model), or a character animation file: in either case, a hierarchy of joints. Definition at line 85 of file eggCharacterData.cxx. |
|
Returns the first joint found with the indicated name, or NULL if no joint has that name.
Definition at line 135 of file eggCharacterData.I. |
|
Returns the model_index of the nth model associated with this character. This model_index may be used to ask questions about the particular model from the EggCharacterCollection object, or from the individual EggJointData and EggSliderData objects. A "model" here is either a character model (or one LOD of a character model), or a character animation file: in either case, a hierarchy of joints. Definition at line 72 of file eggCharacterData.I. References _root_joint, and INLINE. |
|
Returns the model_root of the nth model associated with this character. This is the node at which the character, animation bundle, or LOD officially began within its particular egg file. Definition at line 96 of file eggCharacterData.I. |
|
Returns the total number of models associated with this character. A "model" here is either a character model (or one LOD of a character model), or a character animation file: in either case, a hierarchy of joints. Definition at line 43 of file eggCharacterData.I. |
|
Returns the root joint of the character hierarchy. This root joint does not represent an actual joint in the hierarchy, but instead is a fictitious joint that is the parent of all the top joints in the hierarchy (since the hierarchy may actually contain zero or more top joints). Definition at line 120 of file eggCharacterData.I. |
|
Returns the slider matching the indicated name. If no such slider exists already, creates a new one. Definition at line 103 of file eggCharacterData.cxx. References _sliders. Referenced by EggCharacterCollection::scan_for_morphs(), EggCharacterCollection::scan_for_top_joints(), and EggCharacterCollection::scan_for_top_tables(). |
|
Definition at line 124 of file eggCharacterData.cxx. |
|
Definition at line 117 of file eggCharacterData.h. |
|
Definition at line 115 of file eggCharacterData.h. Referenced by get_num_models(). |
|
Definition at line 118 of file eggCharacterData.h. Referenced by EggCharacterData(), and get_model_index(). |
|
Definition at line 121 of file eggCharacterData.h. Referenced by EggCharacterData(), and make_slider(). |