00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "daeToEgg.h"
00016
00017 #include "daeToEggConverter.h"
00018 #include "pystub.h"
00019
00020
00021
00022
00023
00024
00025 DAEToEgg::
00026 DAEToEgg():
00027 SomethingToEgg("COLLADA", ".dae")
00028 {
00029 add_units_options();
00030 add_normals_options();
00031 add_transform_options();
00032
00033 set_program_description
00034 ("This program converts .dae files (COLLADA Digital Asset Exchange) to .egg.");
00035
00036 _coordinate_system = CS_yup_right;
00037 }
00038
00039
00040
00041
00042
00043
00044 void DAEToEgg::
00045 run() {
00046 nout << "Reading " << _input_filename << "\n";
00047
00048 _data->set_coordinate_system(_coordinate_system);
00049
00050 DAEToEggConverter converter;
00051 converter.set_egg_data(_data);
00052 converter._allow_errors = _allow_errors;
00053
00054 apply_parameters(converter);
00055
00056 if (!converter.convert_file(_input_filename)) {
00057 nout << "Errors in conversion.\n";
00058 exit(1);
00059 }
00060
00061 write_egg_file();
00062 nout << "\n";
00063 }
00064
00065
00066 int main(int argc, char *argv[]) {
00067
00068 pystub();
00069
00070 DAEToEgg prog;
00071 prog.parse_command_line(argc, argv);
00072 prog.run();
00073 return 0;
00074 }