27 set_program_brief(
"convert .egg files to .obj");
28 set_program_description
29 (
"This program converts egg files to obj. It " 30 "only converts polygon data, with no fancy tricks. " 31 "Very bare-bones at the moment; not even texture maps are supported.");
35 "Specify the coordinate system of the resulting " + _format_name +
36 " file. Normally, this is z-up.");
40 "Clean out higher-order polygons by subdividing into triangles.",
41 &EggToObj::dispatch_none, &_triangulate_polygons);
43 _coordinate_system = CS_zup_right;
44 _got_coordinate_system =
true;
52 if (_triangulate_polygons) {
53 nout <<
"Triangulating polygons.\n";
54 int num_produced = _data->triangulate_polygons(~0);
55 nout <<
" (" << num_produced <<
" triangles produced.)\n";
62 nout <<
"An error occurred while writing.\n";
74 return EggToSomething::handle_args(args);
77 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_...
virtual bool write_file(const Filename &filename)
Handles the conversion of the internal EggData to the target file format, written to the specified fi...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Filename get_output_filename() const
If has_output_filename() returns true, this is the filename that the user specified.
void set_egg_data(EggData *egg_data)
Sets the egg data that will be filled in when convert_file() is called.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the general base class for a file-converter program that reads some model file format and gen...
Convert an obj file to egg data.