Panda3D
eggReader.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eggReader.h
10  * @author drose
11  * @date 2000-02-14
12  */
13 
14 #ifndef EGGREADER_H
15 #define EGGREADER_H
16 
17 #include "pandatoolbase.h"
18 
19 #include "eggSingleBase.h"
20 #include "filename.h"
21 
22 class PNMFileType;
23 
24 /**
25  * This is the base class for a program that reads egg files, but doesn't
26  * write an egg file.
27  */
28 class EggReader : virtual public EggSingleBase {
29 public:
30  EggReader();
31 
32  void add_texture_options();
33  void add_delod_options(double default_delod = -1.0);
34 
35  virtual EggReader *as_reader();
36  virtual void pre_process_egg_file();
37 
38 protected:
39  virtual bool handle_args(Args &args);
40  virtual bool post_command_line();
41 
42  bool do_reader_options();
43 
44 private:
45  bool copy_textures();
46  bool do_delod(EggNode *node);
47 
48 protected:
49  bool _force_complete;
50 
51 private:
52  Filename _tex_dirname;
53  bool _got_tex_dirname;
54  std::string _tex_extension;
55  bool _got_tex_extension;
56  PNMFileType *_tex_type;
57  double _delod;
58 };
59 
60 #endif
void add_delod_options(double default_delod=-1.0)
Adds -delod as a valid option for this program.
Definition: eggReader.cxx:104
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_texture_options()
Adds -td, -te, etc.
Definition: eggReader.cxx:70
This is the base class of a family of classes that represent particular image file types that PNMImag...
Definition: pnmFileType.h:32
virtual EggReader * as_reader()
Returns this object as an EggReader pointer, if it is in fact an EggReader, or NULL if it is not.
Definition: eggReader.cxx:137
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This specialization of EggBase is intended for programs that read and/or write a single egg file.
Definition: eggSingleBase.h:37
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
virtual void pre_process_egg_file()
Performs any processing of the egg file that is appropriate after reading it in.
Definition: eggReader.cxx:149
This is the base class for a program that reads egg files, but doesn't write an egg file.
Definition: eggReader.h:28
A base class for things that may be directly added into the egg hierarchy.
Definition: eggNode.h:35