Panda3D
|
This is the general base class for a file-converter program that reads some model file format and generates an egg file. More...
#include "eggToSomething.h"
Public Member Functions | |
EggToSomething (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_units_options () |
Adds -ui and -uo as valid options for this program. | |
Protected Member Functions | |
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 void | pre_process_egg_file () |
Performs any processing of the egg file that is appropriate after reading it in. | |
Protected Attributes | |
DistanceUnit | _input_units |
DistanceUnit | _output_units |
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 29 of file eggToSomething.h.
EggToSomething::EggToSomething | ( | 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".
It's just used in printing error messages and such.
Definition at line 26 of file eggToSomething.cxx.
References ProgramBase::add_runline(), ProgramBase::clear_runlines(), and ProgramBase::redescribe_option().
void EggToSomething::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 96 of file eggToSomething.cxx.
References ProgramBase::add_option(), and ProgramBase::dispatch_units().
void EggToSomething::apply_units_scale | ( | EggData * | data | ) | [protected] |
Applies the scale indicated by the input and output units to the indicated egg file.
This is normally done automatically when the file is read in.
Definition at line 120 of file eggToSomething.cxx.
References LMatrix4d::scale_mat(), and EggNode::transform().
Referenced by pre_process_egg_file().
bool EggToSomething::handle_args | ( | ProgramBase::Args & | args | ) | [protected, virtual] |
Does something with the additional arguments on the command line (after all the -options have been parsed).
Returns true if the arguments are good, false otherwise.
Reimplemented from EggFilter.
Reimplemented in EggToBam.
Definition at line 165 of file eggToSomething.cxx.
References WithOutputFile::check_last_arg().
void EggToSomething::pre_process_egg_file | ( | ) | [protected, virtual] |
Performs any processing of the egg file that is appropriate after reading it in.
Normally, you should not need to call this function directly; it is called automatically at startup.
Reimplemented from EggReader.
Definition at line 151 of file eggToSomething.cxx.
References apply_units_scale().