26 add_path_replace_options();
27 add_path_store_options();
29 add_normals_options();
30 add_transform_options();
31 add_merge_externals_options();
33 set_program_brief(
"convert a MultiGen .flt file to .egg");
34 set_program_description
35 (
"This program converts MultiGen OpenFlight (.flt) files to egg. Most " 36 "features of MultiGen that are also recognized by egg are supported.");
40 "Specify the coordinate system of the input " + _format_name +
41 " file. Normally, this is z-up.");
53 _compose_transforms =
false;
55 _coordinate_system = CS_zup_right;
63 _data->set_coordinate_system(_coordinate_system);
68 converter._compose_transforms = _compose_transforms;
69 converter._allow_errors = _allow_errors;
71 apply_parameters(converter);
76 nout <<
"Reading " << _input_filename <<
"\n";
77 FltError result = header->read_flt(_input_filename);
78 if (result != FE_ok) {
79 nout <<
"Unable to read: " << result <<
"\n";
83 header->check_version();
87 nout <<
"Errors in conversion.\n";
91 if (_input_units == DU_invalid) {
100 int main(
int argc,
char *argv[]) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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_...
void init_libflt()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.