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

raycaster.h

Go to the documentation of this file.
00001 
00006 #ifndef _VUVOLUMEBCCUNIMODAL3D1B1INTENSITYRAYCASTER_H_
00007 #define _VUVOLUMEBCCUNIMODAL3D1B1INTENSITYRAYCASTER_H_
00008 
00009 #include "../intensity.h"
00010 #include "vuSimpleTypes.h"
00011 #include "vuVector.h"
00012 #include "vuMatrix.h"
00013 #include "vuImage.h"
00014 
00015 class vu1512113;
00016 typedef vu1512113 vuVolumeBccUnimodal3d1BIntensityRaycaster;
00017 
00022 class vu1512113 : public vu151211
00023 {
00024  public:
00025   bool refresh;
00027   vu1512113();
00029   vu1512113(const vu1512113& inst);
00031   virtual ~vu1512113();
00032 
00034   vu1512113& operator=(const vu1512113& 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 
00063   void setSamplingDistance(float sdist) {
00064       m_SamplingDistance = sdist;
00065   }
00067   float getSamplingDistance() const { return m_SamplingDistance;}
00069   void setLightDir(const vuVector ldir) {
00070       m_LightDir = ldir;
00071   }
00073   const vuVector getLightDir() { return m_LightDir; }
00074 
00075  private:
00077   void preprocess(void);
00078   bool intersectRayWithBox(vuVector Ro, vuVector Rd, vuVector *f, vuVector *s, vuVector *llc, vuVector *urc);
00079   void renderImage();
00080 
00081  private:
00082 
00083   float*       m_Normals;
00084 
00085   vuImage      m_Image;             
00086   float        m_SamplingDistance;  
00087   vuVector     m_LightDir;          
00088   vuColourRGBa m_Specular;          
00089 };
00090 
00091 #endif

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