proj home

Files   Classes   Functions   Hierarchy  

d4tessdraw.h

Go to the documentation of this file.
00001 #ifndef TETTESSDRAW_H
00002 #define TETTESSDRAW_H
00003 
00004 #include <cassert>
00005 #include <vector>
00006 using namespace std;
00007 
00008 #include <d4tri.h>
00009 #include <point.h>
00010 #include <gobj.h>
00011 
00012 
00013 
00014 #include <d4marchdisp.h>
00015 #include <d4tess.h>
00016 
00017 typedef unsigned int uint;
00018 typedef unsigned int const uintc;
00019 typedef point4<double> pt4;
00020 typedef double real;
00021 typedef double const realc;
00022 
00023 
00024 //  Brief:  Options for drawing the mesh, mesh surface,
00025 //          current state and the mesh winding.
00026 //
00027 class d4tessdraw
00028 {
00029   d4tess & tess;
00030   
00031   gobjContainer gdynamic;
00032 
00033 public:
00034 
00035   gobjSwitchContainer graphicsDeffered;
00036 
00037   gobjSwitchContainer graphicsImmediate;
00038 
00039 
00040   d4tessdraw( d4tess & _tess );
00041 
00042   // Draws and iterates over all the tetrahedrons.
00043   void draw();
00044 
00045   void meshupdate();
00046 
00047 };
00048 
00049 class writepointsobj : public gobj
00050 {
00051   d4tess const & tess;
00052 public:
00053 
00054   gobjglColor3ub col;
00055 
00056   writepointsobj(d4tess const & _tess)
00057     : tess(_tess), col(255,255,0) {}
00058 
00059   void draw() const;
00060 };
00061 
00062 class writesimplicesobj : public gobj
00063 {
00064   d4tess const & tess;
00065 public:
00066 
00067   writesimplicesobj(d4tess const & _tess)
00068     : tess(_tess) {}
00069 
00070   void draw() const;
00071 };
00072 
00073 
00074 class writecpobj : public gobj
00075 {
00076   d4tess const  & tess;
00077 public:
00078 
00079   writecpobj(d4tess const & _tess)
00080     : tess(_tess) {}
00081 
00082   void draw() const;
00083 };
00084 
00085 class writesurfaceobj : public gobj
00086 {
00087   d4tess const  & tess;
00088 public:
00089 
00090   // Configure the surface color.
00091   gobjglColor3ub surfacecolor;
00092 
00093   // Configure the c-value in surface.
00094   d4marchdisp surface;
00095 
00096   writesurfaceobj(d4tess const & _tess)
00097     : tess(_tess), surfacecolor(gobjglColor3ub(255,0,0)) {}
00098 
00099   void draw() const;
00100 };
00101 
00102 class writegridobj : public gobj
00103 {
00104   d4tess const  & tess;
00105 public:
00106 
00107   // Configure the grid or mesh color.
00108   gobjglColor3ub gridcolor;
00109 
00110   writegridobj(d4tess const & _tess)
00111     : tess(_tess), gridcolor(gobjglColor3ub(0,0,255)) {}
00112 
00113   void draw() const;
00114 };
00115 
00116 class writewindingobj : public gobj
00117 {
00118   d4tess const  & tess;
00119 public:
00120 
00121   writewindingobj(d4tess const & _tess)
00122     : tess(_tess) {}
00123 
00124   void draw() const;
00125 };
00126 
00127 class writebaseobj : public gobj
00128 {
00129   d4tess const  & tess;
00130 public:
00131 
00132   writebaseobj(d4tess const & _tess)
00133     : tess(_tess) {}
00134 
00135   void draw() const;
00136 };
00137 
00138 
00139 #endif
00140 
00141 

Generated on Fri Mar 4 00:49:31 2011 for Chelton Evans Source by  doxygen 1.5.8