17 #include "fltToEggConverter.h"
18 #include "config_flt.h"
30 add_path_replace_options();
31 add_path_store_options();
33 add_normals_options();
34 add_transform_options();
35 add_merge_externals_options();
37 set_program_brief(
"convert a MultiGen .flt file to .egg");
38 set_program_description
39 (
"This program converts MultiGen OpenFlight (.flt) files to egg. Most "
40 "features of MultiGen that are also recognized by egg are supported.");
44 "Specify the coordinate system of the input " + _format_name +
45 " file. Normally, this is z-up.");
57 _compose_transforms =
false;
59 _coordinate_system = CS_zup_right;
69 _data->set_coordinate_system(_coordinate_system);
74 converter._compose_transforms = _compose_transforms;
75 converter._allow_errors = _allow_errors;
77 apply_parameters(converter);
82 nout << "Reading " << _input_filename << "\n";
83 FltError result = header->read_flt(_input_filename);
84 if (result != FE_ok) {
85 nout <<
"Unable to read: " << result <<
"\n";
89 header->check_version();
93 nout <<
"Errors in conversion.\n";
97 if (_input_units == DU_invalid) {
106 int main(
int argc,
char *argv[]) {
virtual void parse_command_line(int argc, char **argv)
Dispatches on each of the options on the command line, and passes the remaining parameters to handle_...
This class supervises the construction of an EggData structure from the data represented by the FltHe...
virtual DistanceUnit get_input_units()
This may be called after convert_file() has been called and returned true, indicating a successful co...
void set_egg_data(EggData *egg_data)
Sets the egg data that will be filled in when convert_file() is called.
void write_egg_file()
Writes out the egg file as the normal result of the program.
bool convert_flt(const FltHeader *flt_header)
Fills up the egg_data structure according to the indicated lwo structure.
A program to read a flt file and generate an egg file.
void set_merge_externals(bool merge_externals)
Sets the merge_externals flag.
This is the general base class for a file-converter program that reads some model file format and gen...