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