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

specsplat.h

Go to the documentation of this file.
00001 /*      Written by Steven Bergner...
00002 
00003         Modified June 2002
00004         Modified by Christopher Steinbach
00005         Modified to work with the keyframe animator.
00006 */
00007 
00008 #ifndef _VUVOLUMEREGULARUNIMODAL3D1B1VALSPECSPLAT_H_
00009 #define _VUVOLUMEREGULARUNIMODAL3D1B1VALSPECSPLAT_H_
00010 
00011 #include "../intensity.h"
00012 
00014 // But anyways, we'll have to find a way to handle non-NVidia Environments.
00015 #include <GL/gl.h>
00016 //#include "glnv.h"
00017 
00018 #include "glos.h"
00019 #include <GL/glu.h>
00020 #include "vuSimpleTypes.h"
00021 #include "vuNormalTable.h"
00022 #include "vuTFunc/vuTFDesignSpec.h"
00023 #include "vuColour7a.h"
00024 #include "vuVector.h"
00025 
00026 #include "vuImage.h"
00027 
00028 class vu1112115;
00029 typedef vu1112115 vuVolumeRegularUnimodal3d1B1ValSpecSplat;
00030 
00032 
00034 class vu1112115 : public vu111211
00035 {
00036 public:
00038     vu1112115();
00040     vu1112115(const vu1112115& inst);
00042     virtual ~vu1112115();
00043 
00045     vu1112115& operator=(const vu1112115& rhs);
00046 
00047     void drawPic ();
00048     vuImage* getBuffer ();
00049 
00050 public:
00052     void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right);
00053 
00055     void setFootprintSize(dword size);
00057     dword getFootprintSize() const;
00058 
00060     void initOpenGL(void);
00062     void render();
00063 
00065     virtual bool read();
00066 
00068     virtual bool readRaw(void);
00069 
00070 private:
00072     void preprocess(void);
00073 
00075     void computeSplat(void);
00077     double nelsonSplat(double r);
00078 
00080     void drawSplatOrtho(float* pos);
00082     void drawSplatPerspective(float* pos);
00083 
00084     void initVertexProgram();
00085 
00086     void setCXFMatrix(float* m);
00087 
00088     void setColour7a(const float* col);
00089     void setLightColour (vuColour7a &);
00090     void setLightPosition (vuVector & v);
00091 
00092 private:
00093     vuNormalTable  m_NTable;
00094 #if defined(QUANTIZE_NORMALS)
00095     byte*        m_Normals;
00096 #else
00097     float*       m_Normals;
00098 #endif
00099 
00100     vuImage     m_ImgBuffer;
00101 
00102     GLubyte*     m_Footprint;
00103     dword        m_FPSize;
00104     GLuint       m_GLSplat;
00105 
00106     vuVector     m_View;
00107     vuVector     m_Shift0;
00108     vuVector     m_Shift1;
00109     vuVector     m_Shift2;
00110 };
00111 
00112 #endif

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