Public Member Functions | |
XFileToEggConverter (const XFileToEggConverter ©) | |
void | close () |
Finalizes and closes the file previously opened via convert_file(). More... | |
virtual bool | convert_file (const Filename &filename) |
Handles the reading of the input file and converting it to egg. More... | |
EggMaterial * | create_unique_material (const EggMaterial ©) |
Returns an EggMaterial pointer whose properties match that of the the given EggMaterial, except for the mref name. More... | |
EggTexture * | create_unique_texture (const EggTexture ©) |
Returns an EggTexture pointer whose properties match that of the the given EggTexture, except for the tref name. More... | |
EggGroup * | find_joint (const std::string &joint_name) |
This is called by set_animation_frame, for the purposes of building the frame data for the animation–it needs to know the original rest frame transform. More... | |
EggGroup * | get_dart_node () const |
Returns the root of the joint hierarchy, if _make_char is true, or NULL otherwise. More... | |
virtual std::string | get_extension () const |
Returns the common extension of the file type this converter supports. More... | |
virtual std::string | get_name () const |
Returns the English name of the file type this converter supports. More... | |
virtual SomethingToEggConverter * | make_copy () |
Allocates and returns a new copy of the converter. More... | |
void | strip_nodes (TypeHandle t) |
Removes all groups of the given type. More... | |
virtual bool | supports_compressed () const |
Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise. More... | |
Public Member Functions inherited from SomethingToEggConverter | |
SomethingToEggConverter (const SomethingToEggConverter ©) | |
void | clear_egg_data () |
Sets the EggData to NULL and makes the converter invalid. More... | |
void | clear_end_frame () |
Removes the value previously set by set_end_frame(). More... | |
void | clear_error () |
Resets the error flag to the no-error state. More... | |
void | clear_frame_inc () |
Removes the value previously set by set_frame_inc(). More... | |
void | clear_input_frame_rate () |
Removes the value previously set by set_input_frame_rate(). More... | |
void | clear_neutral_frame () |
Removes the value previously set by set_neutral_frame(). More... | |
void | clear_output_frame_rate () |
Removes the value previously set by set_output_frame_rate(). More... | |
void | clear_start_frame () |
Removes the value previously set by set_start_frame(). More... | |
Filename | convert_model_path (const Filename &orig_filename) |
Converts the indicated model filename to a relative or absolute or whatever filename, according to _path_replace. More... | |
virtual std::string | get_additional_extensions () const |
Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this converter. More... | |
AnimationConvert | get_animation_convert () const |
Returns how source animation will be converted into egg structures. More... | |
const std::string & | get_character_name () const |
Returns the name of the character generated. More... | |
EggData * | get_egg_data () |
Returns the EggData structure. More... | |
double | get_end_frame () const |
Returns the value set by a previous call to set_end_frame(). More... | |
double | get_frame_inc () const |
Returns the value set by a previous call to set_frame_inc(). More... | |
double | get_input_frame_rate () const |
Returns the value set by a previous call to set_input_frame_rate(). More... | |
virtual DistanceUnit | get_input_units () |
This may be called after convert_file() has been called and returned true, indicating a successful conversion. More... | |
bool | get_merge_externals () const |
Returns the current state of the merge_externals flag. More... | |
double | get_neutral_frame () const |
Returns the value set by a previous call to set_neutral_frame(). More... | |
double | get_output_frame_rate () const |
Returns the value set by a previous call to set_output_frame_rate(). More... | |
PathReplace * | get_path_replace () |
Returns a pointer to the PathReplace object associated with this converter. More... | |
const PathReplace * | get_path_replace () const |
Returns a pointer to the PathReplace object associated with this converter. More... | |
double | get_start_frame () const |
Returns the value set by a previous call to set_start_frame(). More... | |
bool | had_error () const |
Returns true if an error was detected during the conversion process (unless _allow_errors is true), false otherwise. More... | |
bool | handle_external_reference (EggGroupNode *egg_parent, const Filename &ref_filename) |
Handles an external reference in the source file. More... | |
bool | has_end_frame () const |
Returns true if the ending frame has been explicitly specified via set_end_frame(), or false if the ending frame should be implicit based on the source. More... | |
bool | has_frame_inc () const |
Returns true if the frame increment has been explicitly specified via set_frame_inc(), or false if the ending frame should be implicit based on the source. More... | |
bool | has_input_frame_rate () const |
Returns true if the frame rate has been explicitly specified via set_input_frame_rate(), or false otherwise. More... | |
bool | has_neutral_frame () const |
Returns true if the neutral frame has been explicitly specified via set_neutral_frame(), or false otherwise. More... | |
bool | has_output_frame_rate () const |
Returns true if the frame rate has been explicitly specified via set_output_frame_rate(), or false otherwise. More... | |
bool | has_start_frame () const |
Returns true if the starting frame has been explicitly specified via set_start_frame(), or false if the starting frame should be implicit based on the source. More... | |
virtual | PT (PandaNode) convert_to_node(const LoaderOptions &options |
void | set_animation_convert (AnimationConvert animation_convert) |
Specifies how source animation will be converted into egg structures. More... | |
void | set_character_name (const std::string &character_name) |
Specifies the name of the character generated. More... | |
void | set_egg_data (EggData *egg_data) |
Sets the egg data that will be filled in when convert_file() is called. More... | |
void | set_end_frame (double end_frame) |
Specifies the ending frame of the animation to convert, in the units specified by set_input_frame_rate(). More... | |
void | set_frame_inc (double frame_inc) |
Specifies the increment between frames to extract. More... | |
void | set_input_frame_rate (double input_frame_rate) |
Specifies the number of frames per second that is represented by the "frame" unit in the animation package. More... | |
void | set_merge_externals (bool merge_externals) |
Sets the merge_externals flag. More... | |
void | set_neutral_frame (double neutral_frame) |
Specifies the frame of animation to represent the neutral pose of the model. More... | |
void | set_output_frame_rate (double output_frame_rate) |
Specifies the number of frames per second that the resulting animation should be played at. More... | |
void | set_path_replace (PathReplace *path_replace) |
Replaces the PathReplace object (which specifies how to mangle paths from the source to the destination egg file) with a new one. More... | |
void | set_start_frame (double start_frame) |
Specifies the starting frame of the animation to convert, in the units specified by set_input_frame_rate(). More... | |
virtual bool | supports_convert_to_node (const LoaderOptions &options) const |
Returns true if this converter can directly convert the model type to internal Panda memory structures, given the indicated options, or false otherwise. More... | |
Public Attributes | |
std::string | _char_name |
double | _frame_rate |
bool | _keep_animation |
bool | _keep_model |
bool | _make_char |
Public Attributes inherited from SomethingToEggConverter | |
bool | _allow_errors |
virtual const Filename & | filename |
Additional Inherited Members | |
Static Public Member Functions inherited from SomethingToEggConverter | |
static double | get_default_frame_rate () |
Returns the default frame rate if nothing is specified for input_frame_rate or output_frame_rate, and the animation package does not have an implicit frame rate. More... | |
Definition at line 40 of file xFileToEggConverter.h.
void XFileToEggConverter::close | ( | ) |
Finalizes and closes the file previously opened via convert_file().
Definition at line 156 of file xFileToEggConverter.cxx.
Referenced by convert_file().
|
virtual |
Handles the reading of the input file and converting it to egg.
Returns true if successful, false otherwise.
This is designed to be as generic as possible, generally in support of run- time loading. Command-line converters may choose to use convert_flt() instead, as it provides more control.
Implements SomethingToEggConverter.
Definition at line 106 of file xFileToEggConverter.cxx.
References SomethingToEggConverter::clear_error(), and close().
EggMaterial * XFileToEggConverter::create_unique_material | ( | const EggMaterial & | copy | ) |
Returns an EggMaterial pointer whose properties match that of the the given EggMaterial, except for the mref name.
Definition at line 217 of file xFileToEggConverter.cxx.
References EggMaterialCollection::create_unique_material().
EggTexture * XFileToEggConverter::create_unique_texture | ( | const EggTexture & | copy | ) |
Returns an EggTexture pointer whose properties match that of the the given EggTexture, except for the tref name.
Definition at line 208 of file xFileToEggConverter.cxx.
References EggTextureCollection::create_unique_texture().
Referenced by XFileMaterial::apply_to_egg().
EggGroup * XFileToEggConverter::find_joint | ( | const std::string & | joint_name | ) |
This is called by set_animation_frame, for the purposes of building the frame data for the animation–it needs to know the original rest frame transform.
Definition at line 227 of file xFileToEggConverter.cxx.
EggGroup * XFileToEggConverter::get_dart_node | ( | ) | const |
Returns the root of the joint hierarchy, if _make_char is true, or NULL otherwise.
Definition at line 199 of file xFileToEggConverter.cxx.
Referenced by XFileAnimationSet::create_hierarchy().
|
virtual |
Returns the common extension of the file type this converter supports.
Implements SomethingToEggConverter.
Definition at line 84 of file xFileToEggConverter.cxx.
|
virtual |
Returns the English name of the file type this converter supports.
Implements SomethingToEggConverter.
Definition at line 76 of file xFileToEggConverter.cxx.
|
virtual |
Allocates and returns a new copy of the converter.
Implements SomethingToEggConverter.
Definition at line 67 of file xFileToEggConverter.cxx.
void XFileToEggConverter::strip_nodes | ( | TypeHandle | t | ) |
Removes all groups of the given type.
This is used to implement the -anim and -model options.
Definition at line 180 of file xFileToEggConverter.cxx.
|
virtual |
Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.
Reimplemented from SomethingToEggConverter.
Definition at line 93 of file xFileToEggConverter.cxx.