Panda3D

eggQtess.h

00001 // Filename: eggQtess.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 EGGQTESS_H
00016 #define EGGQTESS_H
00017 
00018 #include "pandatoolbase.h"
00019 #include "eggFilter.h"
00020 #include "qtessInputFile.h"
00021 #include "qtessSurface.h"
00022 #include "pointerTo.h"
00023 #include "pvector.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : EggQtess
00027 // Description : A program to tesselate NURBS surfaces appearing
00028 //               within an egg file into polygons, using variations on
00029 //               a quick uniform tesselation.
00030 ////////////////////////////////////////////////////////////////////
00031 class EggQtess : public EggFilter {
00032 public:
00033   EggQtess();
00034 
00035   void run();
00036 
00037 protected:
00038   virtual bool handle_args(ProgramBase::Args &args);
00039 
00040 private:
00041   void describe_qtess_format();
00042   void find_surfaces(EggNode *egg_node);
00043 
00044   Filename _qtess_filename;
00045   double _uniform_per_isoparam;
00046   int _uniform_per_surface;
00047   int _total_tris;
00048   bool _qtess_output;
00049   bool _describe_qtess;
00050 
00051   QtessInputFile _qtess_file;
00052   
00053   typedef pvector< PT(QtessSurface) > Surfaces;
00054   Surfaces _surfaces;
00055 };
00056 
00057 #endif
00058 
00059 
 All Classes Functions Variables Enumerations