Panda3D
qtessInputFile.h
1 // Filename: qtessInputFile.h
2 // Created by: drose (13Oct03)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef QTESSINPUTFILE_H
16 #define QTESSINPUTFILE_H
17 
18 #include "pandatoolbase.h"
19 #include "qtessInputEntry.h"
20 #include "filename.h"
21 #include "pvector.h"
22 
23 class QtessSurface;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : QtessInputFile
27 // Description : Stores all the information read from a tesselation
28 // input file: a list of QtessInputEntry's.
29 ////////////////////////////////////////////////////////////////////
31 public:
33  INLINE QtessInputFile(const QtessInputFile &copy);
34  INLINE void operator = (const QtessInputFile &copy);
35 
36  bool read(const Filename &filename);
38 
39  QtessInputEntry::Type match(QtessSurface *surface);
40  int count_tris();
41 
42  void write(ostream &out, int indent_level = 0) const;
43 
44 private:
45  void add_default_entry();
46 
47  Filename _filename;
48 
50  Entries _entries;
51 };
52 
53 #include "qtessInputFile.I"
54 
55 #endif
A reference to an EggNurbsSurface in the egg file, and its parameters as set by the user input file a...
Definition: qtessSurface.h:34
Stores all the information read from a tesselation input file: a list of QtessInputEntry's.
QtessInputEntry::Type match(QtessSurface *surface)
Attempts to find a match for the given surface in the user input entries.
int count_tris()
Determines the tesselation u,v amounts of each attached surface, and stores this information in the s...
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
QtessInputEntry & get_default_entry()
Returns a reference to the last entry on the list, which is the "default" entry that will match any s...
Stores one entry in the qtess input file.
bool read(const Filename &filename)
reads the input file.