Panda3D

qtessInputFile.h

00001 // Filename: qtessInputFile.h
00002 // Created by:  drose (13Oct03)
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 QTESSINPUTFILE_H
00016 #define QTESSINPUTFILE_H
00017 
00018 #include "pandatoolbase.h"
00019 #include "qtessInputEntry.h"
00020 #include "filename.h"
00021 #include "pvector.h"
00022 
00023 class QtessSurface;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : QtessInputFile
00027 // Description : Stores all the information read from a tesselation
00028 //               input file: a list of QtessInputEntry's.
00029 ////////////////////////////////////////////////////////////////////
00030 class QtessInputFile {
00031 public:
00032   QtessInputFile();
00033   INLINE QtessInputFile(const QtessInputFile &copy);
00034   INLINE void operator = (const QtessInputFile &copy);
00035 
00036   bool read(const Filename &filename);
00037   QtessInputEntry &get_default_entry();
00038 
00039   QtessInputEntry::Type match(QtessSurface *surface);
00040   int count_tris();
00041 
00042   void write(ostream &out, int indent_level = 0) const;
00043 
00044 private:
00045   void add_default_entry();
00046 
00047   Filename _filename;
00048 
00049   typedef pvector<QtessInputEntry> Entries;
00050   Entries _entries;
00051 };
00052 
00053 #include "qtessInputFile.I"
00054 
00055 #endif
 All Classes Functions Variables Enumerations