Panda3D
Public Member Functions | Public Attributes
XFileToEggConverter Class Reference
Inheritance diagram for XFileToEggConverter:
SomethingToEggConverter

List of all members.

Public Member Functions

 XFileToEggConverter (const XFileToEggConverter &copy)
void close ()
 Finalizes and closes the file previously opened via convert_file().
virtual bool convert_file (const Filename &filename)
 Handles the reading of the input file and converting it to egg.
EggMaterialcreate_unique_material (const EggMaterial &copy)
 Returns an EggMaterial pointer whose properties match that of the the given EggMaterial, except for the mref name.
EggTexturecreate_unique_texture (const EggTexture &copy)
 Returns an EggTexture pointer whose properties match that of the the given EggTexture, except for the tref name.
EggGroupfind_joint (const 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.
EggGroupget_dart_node () const
 Returns the root of the joint hierarchy, if _make_char is true, or NULL otherwise.
virtual string get_extension () const
 Returns the common extension of the file type this converter supports.
virtual string get_name () const
 Returns the English name of the file type this converter supports.
virtual SomethingToEggConvertermake_copy ()
 Allocates and returns a new copy of the converter.
void strip_nodes (TypeHandle t)
 Removes all groups of the given type.
virtual bool supports_compressed () const
 Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.

Public Attributes

string _char_name
double _frame_rate
bool _keep_animation
bool _keep_model
bool _make_char

Detailed Description

Definition at line 42 of file xFileToEggConverter.h.


Member Function Documentation

Finalizes and closes the file previously opened via convert_file().

Definition at line 178 of file xFileToEggConverter.cxx.

Referenced by convert_file().

bool XFileToEggConverter::convert_file ( const Filename filename) [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 125 of file xFileToEggConverter.cxx.

References SomethingToEggConverter::clear_error(), close(), Filename::get_basename_wo_extension(), SomethingToEggConverter::had_error(), strip_nodes(), and EggNameUniquifier::uniquify().

Returns an EggMaterial pointer whose properties match that of the the given EggMaterial, except for the mref name.

Definition at line 249 of file xFileToEggConverter.cxx.

References EggMaterialCollection::create_unique_material().

Referenced by XFileMaterial::apply_to_egg().

Returns an EggTexture pointer whose properties match that of the the given EggTexture, except for the tref name.

Definition at line 237 of file xFileToEggConverter.cxx.

References EggTextureCollection::create_unique_texture().

Referenced by XFileMaterial::apply_to_egg().

EggGroup * XFileToEggConverter::find_joint ( const 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 262 of file xFileToEggConverter.cxx.

Referenced by XFileMesh::create_polygons().

Returns the root of the joint hierarchy, if _make_char is true, or NULL otherwise.

Definition at line 225 of file xFileToEggConverter.cxx.

Referenced by XFileAnimationSet::create_hierarchy().

string XFileToEggConverter::get_extension ( ) const [virtual]

Returns the common extension of the file type this converter supports.

Implements SomethingToEggConverter.

Definition at line 96 of file xFileToEggConverter.cxx.

string XFileToEggConverter::get_name ( ) const [virtual]

Returns the English name of the file type this converter supports.

Implements SomethingToEggConverter.

Definition at line 85 of file xFileToEggConverter.cxx.

Allocates and returns a new copy of the converter.

Implements SomethingToEggConverter.

Definition at line 73 of file xFileToEggConverter.cxx.

Removes all groups of the given type.

This is used to implement the -anim and -model options.

Definition at line 204 of file xFileToEggConverter.cxx.

References TypedObject::is_of_type().

Referenced by convert_file().

bool XFileToEggConverter::supports_compressed ( ) const [virtual]

Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.

Reimplemented from SomethingToEggConverter.

Definition at line 108 of file xFileToEggConverter.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations