00001 00002 00012 #ifndef _VUVOLUMEBCCUNIMODAL3D1B1VALSPLAT_H_ 00013 #define _VUVOLUMEBCCUNIMODAL3D1B1VALSPLAT_H_ 00014 00015 #include "../intensity.h" 00016 #include "glos.h" 00017 #include <GL/gl.h> 00018 #include <GL/glu.h> 00019 #include "vuSimpleTypes.h" 00020 #include "vuNormalTable.h" 00021 #include "vuVector.h" 00022 00023 class vu1512111; 00024 typedef vu1512111 vuVolumeBccUnimodal3d1B1ValSplat; 00025 00026 class vu1512111 : public vu151211 00027 { 00028 public: 00030 vu1512111(); 00032 vu1512111(const vu1512111& inst); 00034 virtual ~vu1512111(); 00035 00037 vu1512111& operator=(const vu1512111& rhs); 00038 00039 public: 00041 void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right); 00042 00044 void setFootprintSize(dword size); 00046 dword getFootprintSize() const; 00047 00049 void initOpenGL(void); 00051 void render(); 00052 00054 virtual bool read(); 00055 00057 virtual bool readRaw(void); 00058 00059 private: 00061 void preprocess(void); 00062 00064 void computeSplat(void); 00066 double nelsonSplat(double r); 00067 00068 double gaussSplat(double r); 00069 00071 void drawSplatOrtho(float* pos); 00073 void drawSplatPerspective(float* pos); 00074 00075 private: 00076 vuNormalTable m_NTable; 00077 #if defined(QUANTIZE_NORMALS) 00078 byte* m_Normals; 00079 #else 00080 float* m_Normals; 00081 #endif 00082 00083 GLubyte* m_Footprint; 00084 dword m_FPSize; 00085 GLuint m_GLSplat; 00086 00087 vuVector m_View; 00088 vuVector m_Shift0; 00089 vuVector m_Shift1; 00090 vuVector m_Shift2; 00091 }; 00092 00093 #endif