24 _collection =
nullptr;
26 _force_initial_rest_frame =
false;
33~EggCharacterFilter() {
34 if (_collection !=
nullptr) {
42void EggCharacterFilter::
46 "Specify this to force all the initial rest frames of the various "
47 "model files to the same value as the first model specified. This "
48 "is a fairly drastic way to repair models whose initial rest frame "
49 "values are completely bogus, but should not be performed when the "
50 "input models are correct.",
51 &EggCharacterFilter::dispatch_none, &_force_initial_rest_frame);
58bool EggCharacterFilter::
60 if (_collection ==
nullptr) {
61 _collection = make_collection();
64 if (!EggMultiFilter::post_command_line()) {
69 for (ei = _eggs.begin(); ei != _eggs.end(); ++ei) {
72 if (_collection->
add_egg(data) < 0) {
73 nout << data->get_egg_filename().get_basename()
74 <<
" does not contain a character model or animation channel.\n";
79 _collection->
check_errors(nout, _force_initial_rest_frame);
89void EggCharacterFilter::
94 for (
int i = 0; i < num_characters; i++) {
99 EggMultiFilter::write_eggs();
Represents a set of characters, as read and collected from possibly several model and/or animation eg...
int get_num_characters() const
Returns the number of separate Characters that have been discovered in the various egg files added to...
int add_egg(EggData *egg)
Adds a new egg file to the list of models and animation files for this particular character.
void check_errors(std::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...
EggCharacterData * get_character(int i) const
Returns the ith character in the collection.
Represents a single character, as read and collected from several models and animation files.
EggJointData * get_root_joint() const
Returns the root joint of the character hierarchy.
This is the primary interface into all the egg data, and the root of the egg file structure.
void optimize()
Calls optimize() on all models, and recursively on all joints at this node and below.
This is a base class for a program that reads in a number of egg files, operates on them,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.