24 set_program_brief(
"describe the contents of a MultiGen .flt file");
25 set_program_description
26 (
"This program reads a MultiGen OpenFlight (.flt) file and reports " 27 "some interesting things about its contents.");
30 add_runline(
"[opts] input.flt");
34 "List the hierarchy in the flt file.",
35 &FltInfo::dispatch_none, &_list_hierarchy);
46 nout <<
"Reading " << _input_filename <<
"\n";
47 FltError result = header->read_flt(_input_filename);
48 if (result != FE_ok) {
49 nout <<
"Unable to read: " << result <<
"\n";
53 if (header->check_version()) {
54 nout <<
"Version is " << header->get_flt_version() / 100.0 <<
"\n";
57 if (_list_hierarchy) {
58 list_hierarchy(header, 0);
66 list_hierarchy(
FltRecord *record,
int indent_level) {
68 record->write(std::cout, indent_level);
78 nout <<
"You must specify the .flt file to read on the command line.\n";
81 }
else if (args.size() != 1) {
82 nout <<
"You must specify only one .flt file to read on the command line.\n";
86 _input_filename = args[0];
92 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_...
The base class for all kinds of records in a MultiGen OpenFlight file.
A program to read a flt file and report interesting things about it.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.