14 #ifndef SOMETHINGTOEGGCONVERTER_H 15 #define SOMETHINGTOEGGCONVERTER_H 100 virtual std::string get_name()
const=0;
101 virtual std::string get_extension()
const=0;
106 virtual bool convert_file(
const Filename &filename)=0;
122 std::string _character_name;
126 double _neutral_frame;
127 double _input_frame_rate;
128 double _output_frame_rate;
130 CF_start_frame = 0x0001,
131 CF_end_frame = 0x0002,
132 CF_frame_inc = 0x0004,
133 CF_neutral_frame = 0x0008,
134 CF_input_frame_rate = 0x0010,
135 CF_output_frame_rate = 0x0020,
139 bool _merge_externals;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
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 structure...
void set_character_name(const std::string &character_name)
Specifies the name of the character generated.
void clear_input_frame_rate()
Removes the value previously set by set_input_frame_rate().
AnimationConvert
This enumerated type lists the methods by which animation from an animation package might be represen...
void set_frame_inc(double frame_inc)
Specifies the increment between frames to extract.
void clear_frame_inc()
Removes the value previously set by set_frame_inc().
bool had_error() const
Returns true if an error was detected during the conversion process (unless _allow_errors is true),...
void clear_start_frame()
Removes the value previously set by set_start_frame().
Specifies parameters that may be passed to the loader.
A base class for nodes in the hierarchy that are not leaf nodes.
void clear_output_frame_rate()
Removes the value previously set by set_output_frame_rate().
bool has_frame_inc() const
Returns true if the frame increment has been explicitly specified via set_frame_inc(),...
bool has_start_frame() const
Returns true if the starting frame has been explicitly specified via set_start_frame(),...
bool has_neutral_frame() const
Returns true if the neutral frame has been explicitly specified via set_neutral_frame(),...
bool handle_external_reference(EggGroupNode *egg_parent, const Filename &ref_filename)
Handles an external reference in the source file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggData * get_egg_data()
Returns the EggData structure.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
double get_neutral_frame() const
Returns the value set by a previous call to set_neutral_frame().
void set_neutral_frame(double neutral_frame)
Specifies the frame of animation to represent the neutral pose of the model.
This is the primary interface into all the egg data, and the root of the egg file structure.
bool has_input_frame_rate() const
Returns true if the frame rate has been explicitly specified via set_input_frame_rate(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
DistanceUnit
This enumerated type lists all the kinds of units we're likely to come across in model conversion pro...
void set_start_frame(double start_frame)
Specifies the starting frame of the animation to convert, in the units specified by set_input_frame_r...
void clear_egg_data()
Sets the EggData to NULL and makes the converter invalid.
void set_end_frame(double end_frame)
Specifies the ending frame of the animation to convert, in the units specified by set_input_frame_rat...
void clear_error()
Resets the error flag to the no-error state.
The name of a file, such as a texture file or an Egg file.
double get_input_frame_rate() const
Returns the value set by a previous call to set_input_frame_rate().
virtual std::string get_additional_extensions() const
Returns a space-separated list of extension, in addition to the one returned by get_extension(),...
AnimationConvert get_animation_convert() const
Returns how source animation will be converted into egg structures.
void set_path_replace(PathReplace *path_replace)
Replaces the PathReplace object (which specifies how to mangle paths from the source to the destinati...
const std::string & get_character_name() const
Returns the name of the character generated.
void clear_neutral_frame()
Removes the value previously set by set_neutral_frame().
void set_animation_convert(AnimationConvert animation_convert)
Specifies how source animation will be converted into egg structures.
void set_egg_data(EggData *egg_data)
Sets the egg data that will be filled in when convert_file() is called.
double get_frame_inc() const
Returns the value set by a previous call to set_frame_inc().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
double get_start_frame() const
Returns the value set by a previous call to set_start_frame().
PathReplace * get_path_replace()
Returns a pointer to the PathReplace object associated with this converter.
This encapsulates the user's command-line request to replace existing, incorrect pathnames to models ...
bool has_end_frame() const
Returns true if the ending frame has been explicitly specified via set_end_frame(),...
void set_merge_externals(bool merge_externals)
Sets the merge_externals flag.
double get_output_frame_rate() const
Returns the value set by a previous call to set_output_frame_rate().
void set_output_frame_rate(double output_frame_rate)
Specifies the number of frames per second that the resulting animation should be played at.
bool get_merge_externals() const
Returns the current state of the merge_externals flag.
void clear_end_frame()
Removes the value previously set by set_end_frame().
virtual DistanceUnit get_input_units()
This may be called after convert_file() has been called and returned true, indicating a successful co...
static double get_default_frame_rate()
Returns the default frame rate if nothing is specified for input_frame_rate or output_frame_rate,...
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 pa...
This is a base class for a family of converter classes that manage a conversion from some file type t...
bool has_output_frame_rate() const
Returns true if the frame rate has been explicitly specified via set_output_frame_rate(),...
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension),...
Filename convert_model_path(const Filename &orig_filename)
Converts the indicated model filename to a relative or absolute or whatever filename,...
double get_end_frame() const
Returns the value set by a previous call to set_end_frame().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.