00001 00007 #ifndef _VUVOLUMEBCCUNIMODAL3D1B1THRESHOLDFIRSTHITRAYCASTER_H_ 00008 #define _VUVOLUMEBCCUNIMODAL3D1B1THRESHOLDFIRSTHITRAYCASTER_H_ 00009 00010 #include "../threshold.h" 00011 #include "vuSimpleTypes.h" 00012 #include "vuVector.h" 00013 #include "vuMatrix.h" 00014 #include "vuImage.h" 00015 00016 class vu1512122; 00017 typedef vu1512122 vuVolumeBccUnimodal3d1BThresholdFirstHitRaycaster; 00018 00022 class vu1512122 : public vu151212 00023 { 00024 public: 00025 bool refresh; 00027 vu1512122(); 00029 vu1512122(const vu1512122& inst); 00031 virtual ~vu1512122(); 00032 00034 vu1512122& operator=(const vu1512122& rhs); 00035 00036 public: 00038 void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right); 00039 00041 void setImageSize(int sx, int sy); 00042 00046 vuImage *getImage() { return &m_Image; } 00047 00049 void initOpenGL(void); 00051 void render(); 00052 00054 virtual bool read(); 00055 00057 virtual bool readRaw(void); 00058 00060 void displayFromImage(); 00061 00062 private: 00064 void preprocess(void); 00065 bool intersectRayWithBox(vuVector Ro, vuVector Rd, vuVector *f, vuVector *s, vuVector *llc, vuVector *urc); 00066 void renderImage(); 00067 00068 private: 00069 00070 float* m_Normals; 00071 00072 /* vuVector m_View; */ 00073 /* vuVector m_Shift0; */ 00074 /* vuVector m_Shift1; */ 00075 /* vuVector m_Shift2; */ 00076 00077 vuImage m_Image; 00078 }; 00079 00080 #endif