Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

marchingtetrahedra.h

Go to the documentation of this file.
00001 /*      Modified April 2002
00002         Modified by Christopher Steinbach
00003 
00004         Modified to remove the ios::nocreate flag in the
00005         SGI-IRIX compile because it doesn't seem to be
00006         available for the SGIs
00007 */
00008 
00009 #ifndef _VUVOLUMEBCCUNIMODAL3D1B1THRESHOLDMARCHINGTETRAHEDRA_H_
00010 #define _VUVOLUMEBCCUNIMODAL3D1B1THRESHOLDMARCHINGTETRAHEDRA_H_
00011 
00012 #include "../threshold.h"
00013 #include "glos.h"
00014 #include <GL/gl.h>
00015 #include <GL/glu.h>
00016 #include "vuSimpleTypes.h"
00017 #include "vuNormalTable.h"
00018 #include "vuVector.h"
00019 
00020 class vu1512121;
00021 typedef vu1512121 vuVolumeBccUnimodal3d1BThresholdMarchingTetrahedra;
00022 
00024 
00037 class vu1512121 : public vu151212
00038 {
00039 public:
00041     vu1512121();
00043     vu1512121(const vu1512121& inst);
00045     virtual ~vu1512121();
00046 
00048     vu1512121& operator=(const vu1512121& rhs);
00049 
00050 public:
00052     void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right);
00053 
00055     void initOpenGL(void);
00057     void render();
00058     void DrawSurfaceInSimplex(int indices[4][3], float ht);
00059     void drawTriangle(float v1[3], float v2[3], float v3[3],
00060                                  float n1[3], float n2[3], float n3[3], bool order);
00061     byte height(unsigned int x, unsigned int y, unsigned int z);
00062     void computeGradient(int i, int j, int k, float *g, int mode);
00063     void ComputeNormal(float *p, float *q, float *r, float *n);
00064     void InterpolatePoint(float x1, float y1, float z1, float h1,       //      linear interpolation along an edge
00065                           float x2, float y2, float z2, float h2, 
00066                           float ht, float* result);
00067 
00068     long getNTriangles() { return nTriangles; };
00069     void resetNTriangles() { nTriangles = 0; };
00070 
00072     virtual bool read();
00073     
00075     virtual bool readRaw(void);
00076 
00077 private:
00078     int shading;
00079     long nTriangles;
00080     int printN;
00081     
00082     static const int WIRE = 0;
00083     static const int FLAT = 1;
00084     static const int SMOOTH = 2;
00085 
00086     vuVector     m_View;
00087     vuVector     m_Shift0;
00088     vuVector     m_Shift1;
00089     vuVector     m_Shift2;
00090 };
00091 
00092 #endif

Generated on Wed Dec 15 21:20:29 2004 for vuVolume by  doxygen 1.3.9.1