|
|
|
This is the general base class for a file-converter program that reads some model file format and generates an egg file.
More...
#include "somethingToEgg.h"
List of all members.
Public Member Functions |
| | SomethingToEgg (const string &format_name, const string &preferred_extension=string(), bool allow_last_param=true, bool allow_stdout=true) |
| | The first parameter to the constructor should be the one-word name of the file format that is to be read, for instance "OpenFlight" or "Alias".
|
| void | add_animation_options () |
| | Adds options appropriate to animation packages.
|
| void | add_merge_externals_options () |
| | Adds -f.
|
| void | add_units_options () |
| | Adds -ui and -uo as valid options for this program.
|
Protected Member Functions |
| void | apply_parameters (SomethingToEggConverter &converter) |
| | Copies the relevant parameters specified by the user on the command line (if add_path_replace_options(), add_path_store_options(), or add_animation_options() was used) to the converter.
|
| void | apply_units_scale (EggData *data) |
| | Applies the scale indicated by the input and output units to the indicated egg file.
|
| virtual bool | handle_args (Args &args) |
| | Does something with the additional arguments on the command line (after all the -options have been parsed).
|
| virtual bool | post_command_line () |
| | This is called after the command line has been completely processed, and it gives the program a chance to do some last-minute processing and validation of the options and arguments.
|
| virtual void | post_process_egg_file () |
| | Performs any processing of the egg file that is appropriate before writing it out.
|
Static Protected Member Functions |
| static bool | dispatch_animation_convert (const string &opt, const string &arg, void *var) |
| | Dispatch function to set the given animation convert mode according to the specified parameter.
|
Protected Attributes |
|
bool | _allow_errors |
|
AnimationConvert | _animation_convert |
|
string | _character_name |
|
double | _end_frame |
|
double | _frame_inc |
|
bool | _got_end_frame |
|
bool | _got_frame_inc |
|
bool | _got_input_frame_rate |
|
bool | _got_neutral_frame |
|
bool | _got_output_frame_rate |
|
bool | _got_start_frame |
|
Filename | _input_filename |
|
double | _input_frame_rate |
|
DistanceUnit | _input_units |
|
bool | _merge_externals |
|
double | _neutral_frame |
|
bool | _noexist |
|
double | _output_frame_rate |
|
DistanceUnit | _output_units |
|
double | _start_frame |
Detailed Description
This is the general base class for a file-converter program that reads some model file format and generates an egg file.
Definition at line 32 of file somethingToEgg.h.
Constructor & Destructor Documentation
| SomethingToEgg::SomethingToEgg |
( |
const string & |
format_name, |
|
|
const string & |
preferred_extension = string(), |
|
|
bool |
allow_last_param = true, |
|
|
bool |
allow_stdout = true |
|
) |
| |
Member Function Documentation
| void SomethingToEgg::add_animation_options |
( |
| ) |
|
| void SomethingToEgg::add_merge_externals_options |
( |
| ) |
|
| void SomethingToEgg::add_units_options |
( |
| ) |
|
Adds -ui and -uo as valid options for this program.
If the user specifies -uo and -ui, or just -uo and the program specifies -ui by setting _input_units, the indicated units conversion will be automatically applied before writing out the egg file.
Definition at line 94 of file somethingToEgg.cxx.
References ProgramBase::add_option(), and ProgramBase::dispatch_units().
Copies the relevant parameters specified by the user on the command line (if add_path_replace_options(), add_path_store_options(), or add_animation_options() was used) to the converter.
Definition at line 214 of file somethingToEgg.cxx.
References SomethingToEggConverter::set_animation_convert(), SomethingToEggConverter::set_character_name(), SomethingToEggConverter::set_end_frame(), SomethingToEggConverter::set_frame_inc(), SomethingToEggConverter::set_input_frame_rate(), SomethingToEggConverter::set_neutral_frame(), SomethingToEggConverter::set_output_frame_rate(), SomethingToEggConverter::set_path_replace(), and SomethingToEggConverter::set_start_frame().
| void SomethingToEgg::apply_units_scale |
( |
EggData * |
data | ) |
[protected] |
| bool SomethingToEgg::dispatch_animation_convert |
( |
const string & |
opt, |
|
|
const string & |
arg, |
|
|
void * |
var |
|
) |
| [static, protected] |
Dispatch function to set the given animation convert mode according to the specified parameter.
var is a pointer to an AnimationConvert variable.
Definition at line 347 of file somethingToEgg.cxx.
Referenced by add_animation_options().
| bool SomethingToEgg::handle_args |
( |
Args & |
args | ) |
[protected, virtual] |
| bool SomethingToEgg::post_command_line |
( |
| ) |
[protected, virtual] |
| void SomethingToEgg::post_process_egg_file |
( |
| ) |
[protected, virtual] |
Performs any processing of the egg file that is appropriate before writing it out.
This includes any normal adjustments the user requested via -np, etc.
Normally, you should not need to call this function directly; write_egg_file() calls it for you. You should call this only if you do not use write_egg_file() to write out the resulting egg file.
Reimplemented from EggWriter.
Definition at line 334 of file somethingToEgg.cxx.
References apply_units_scale().
The documentation for this class was generated from the following files:
| | |