Go to the documentation of this file.
14 #ifndef EGGCHARACTERDATA_H
15 #define EGGCHARACTERDATA_H
87 virtual void write(std::ostream &out,
int indent_level = 0)
const;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggSliderData * make_slider(const std::string &name)
Returns the slider matching the indicated name.
EggSliderData * get_slider(int n) const
Returns the nth slider in the character slider list.
EggComponentData * get_component(int n) const
Returns the nth joint or slider in the character.
int get_num_sliders() const
Returns the number of sliders in the character slider list.
EggSliderData * find_slider(const std::string &name) const
Returns the slider with the indicated name, or NULL if no slider has that name.
Represents a single character, as read and collected from several models and animation files.
EggJointData * find_joint(const std::string &name) const
Returns the first joint found with the indicated name, or NULL if no joint has that name.
int get_num_components() const
Returns the total number of joints and sliders in the character.
void add_model(int model_index, EggNode *model_root, EggData *egg_data)
Indicates that the given model_index (with the indicated model_root) is associated with this characte...
void choose_optimal_hierarchy()
Chooses the best possible parent joint for each of the joints in the hierarchy, based on the score co...
EggNode * get_model_root(int n) const
Returns the model_root of the nth model associated with this character.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
size_t estimate_db_size() const
Returns the estimated amount of memory, in megabytes, that will be required to perform the do_reparen...
EggJointData * get_joint(int n) const
Returns the nth joint in the character joint hierarchy.
double get_frame_rate(int model_index) const
Returns the stated frame rate of the specified model.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the primary interface into all the egg data, and the root of the egg file structure.
This is one node of a hierarchy of EggJointData nodes, each of which represents a single joint of the...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class of both EggJointData and EggSliderData.
int get_num_frames(int model_index) const
Returns the number of frames of animation of the indicated model.
void rename_char(const std::string &name)
Renames all of the models in the character data to the indicated name.
This corresponds to a single morph slider control.
int get_model_index(int n) const
Returns the model_index of the nth model associated with this character.
bool check_num_frames(int model_index)
Walks through each component and ensures that all have the same number of frames of animation (except...
int get_num_joints() const
Returns the total number of joints in the character joint hierarchy.
EggData * get_egg_data(int n) const
Returns the EggData representing the egg file that defined this particular model.
EggJointData * get_root_joint() const
Returns the root joint of the character hierarchy.
bool do_reparent()
Begins the process of restructuring the joint hierarchy according to the previous calls to reparent_t...
A base class for all things which can have a name.
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int get_num_models() const
Returns the total number of models associated with this character.
EggJointData * make_new_joint(const std::string &name, EggJointData *parent)
Creates a new joint as a child of the indicated joint and returns it.
A base class for things that may be directly added into the egg hierarchy.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is used during joint optimization or restructuring to store the table of interim joint com...
A handy class for converting a list of arbitrary names (strings) so that each name is guaranteed to b...