Panda3D
|
00001 // Filename: eggReader.h 00002 // Created by: drose (14Feb00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef EGGREADER_H 00016 #define EGGREADER_H 00017 00018 #include "pandatoolbase.h" 00019 00020 #include "eggSingleBase.h" 00021 #include "filename.h" 00022 00023 class PNMFileType; 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Class : EggReader 00027 // Description : This is the base class for a program that reads egg 00028 // files, but doesn't write an egg file. 00029 //////////////////////////////////////////////////////////////////// 00030 class EggReader : virtual public EggSingleBase { 00031 public: 00032 EggReader(); 00033 00034 void add_texture_options(); 00035 void add_delod_options(double default_delod = -1.0); 00036 00037 virtual EggReader *as_reader(); 00038 virtual void pre_process_egg_file(); 00039 00040 protected: 00041 virtual bool handle_args(Args &args); 00042 virtual bool post_command_line(); 00043 00044 bool do_reader_options(); 00045 00046 private: 00047 bool copy_textures(); 00048 bool do_delod(EggNode *node); 00049 00050 protected: 00051 bool _force_complete; 00052 00053 private: 00054 Filename _tex_dirname; 00055 bool _got_tex_dirname; 00056 string _tex_extension; 00057 bool _got_tex_extension; 00058 PNMFileType *_tex_type; 00059 double _delod; 00060 }; 00061 00062 #endif 00063 00064