15 #ifndef EGGCHARACTERCOLLECTION_H
16 #define EGGCHARACTERCOLLECTION_H
18 #include "pandatoolbase.h"
20 #include "eggCharacterData.h"
24 #include "pointerTo.h"
55 virtual void write(ostream &out,
int indent_level = 0)
const;
56 void check_errors(ostream &out,
bool force_initial_rest_frame);
70 int _first_model_index;
81 bool scan_hierarchy(
EggNode *egg_node);
83 const string &character_name);
85 const string &character_name);
86 void scan_for_morphs(
EggNode *egg_node,
int model_index,
88 void scan_for_sliders(
EggNode *egg_node,
int model_index,
99 class ModelDescription {
101 INLINE ModelDescription();
108 TopEggNodesByName _top_egg_nodes;
110 int _next_model_index;
113 EggNodeList &egg_nodes,
int egg_index,
int model_index);
115 EggNode *egg_node,
int egg_index,
int model_index);
118 #include "eggCharacterCollection.I"
virtual EggCharacterData * make_character_data()
Allocates and returns a new EggCharacterData structure.
This is our own Panda specialization on the default STL map.
EggData * get_egg(int i) const
Returns the ith egg file.
This corresponds to a single morph slider control.
int add_egg(EggData *egg)
Adds a new egg file to the list of models and animation files for this particular character...
This is the primary interface into all the egg data, and the root of the egg file structure...
EggCharacterData * get_character_by_model_index(int model_index) const
Returns the character associated with the indicated model index.
The set of attributes that may be applied to vertices as well as polygons, such as surface normal and...
int get_num_eggs() const
Returns the number of egg files that have successfully been added to the Character table...
EggCharacterData * make_character(const string &character_name)
Allocates and returns a new EggCharacterData object representing the named character, if there is not already a character by that name.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal...
EggCharacterData * get_character_by_name(const string &character_name) const
Returns the Character with the indicated name, if it exists in the collection, or NULL if it does not...
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
int get_first_model_index(int egg_index) const
Returns the first model index associated with the indicated egg file.
int get_num_models(int egg_index) const
Returns the number of different models found in the indicated egg file.
Represents a single character, as read and collected from several models and animation files...
void rename_char(int i, const string &name)
Renames the ith character to the indicated name.
This is one node of a hierarchy of EggJointData nodes, each of which represents a single joint of the...
EggCharacterData * get_character(int i) const
Returns the ith character in the collection.
virtual EggSliderData * make_slider_data(EggCharacterData *char_data)
Allocates and returns a new EggSliderData structure for the given character.
A base class for things that may be directly added into the egg hierarchy.
void check_errors(ostream &out, bool force_initial_rest_frame)
Can be called after the collection has been completely filled up with egg files to output any message...
The highest-level base class in the egg directory.
int get_num_characters() const
Returns the number of separate Characters that have been discovered in the various egg files added to...
virtual EggJointData * make_joint_data(EggCharacterData *char_data)
Allocates and returns a new EggJointData structure for the given character.