00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkGLSLFullVRScene_h
00011 #define __mitkGLSLFullVRScene_h
00012
00013 #include "mitkVis2Scene3D.h"
00014 #include "modules/mitkGLSLFullVR.h"
00015
00016 #include "mitkRCPtr.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019
00020 #include "mitkVersionCounter.h"
00021
00028 class MITK_VISUALIZATION2_API mitkGLSLFullVRScene : public mitkVis2Scene3D
00029 {
00030 public:
00031 MITK_TYPE(mitkGLSLFullVRScene,mitkVis2Scene3D)
00032 mitkGLSLFullVRScene();
00033
00037 virtual void RenderGL();
00038
00043 void SetData(mitkICVolume *data);
00044
00048 void SetDataModified();
00049
00056 void SetBackGroundColor(float r,float g, float b);
00057
00064 void GetBackGroundColor(float& r,float& g,float& b);
00065
00070 mitkRGBATransferFunction1D* GetTransferFunction();
00071
00076 void SetTransferFunction(mitkRGBATransferFunction1D* tf);
00077
00083 void SetStdSampleDistance(float stdSampleDistance);
00084
00090 float GetStdSampleDistance();
00091
00096 void SetShade(bool shade);
00097
00102 bool GetShade();
00103
00107 void ShadeOn();
00108
00112 void ShadeOff();
00113
00120 void SetLightDirection(float x,float y,float z);
00121
00126 void SetLightIntensity(float intensity);
00127
00134 void SetLightColor(float r,float g,float b);
00135
00140 void SetAmbient(float value);
00141
00146 float GetAmbient();
00147
00152 void SetDiffuse(float value);
00153
00158 float GetDiffuse();
00159
00164 void SetSpecular(float value);
00165
00170 float GetSpecular();
00171
00176 void SetSpecularPower(float value);
00177
00182 float GetSpecularPower();
00183
00188 void SetSampleDistance(float sd);
00189
00194 float GetSampleDistance();
00195
00200 void RotateLightDirection(bool turnOn);
00201
00205 virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00209 virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00213 virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00214
00215 mitkGLSLFullVR& GetKernelModule() { return m_module; }
00216
00217 protected:
00218 virtual ~mitkGLSLFullVRScene();
00219 virtual void GetSize3D(float size[3]);
00220
00221 private:
00222 mitkGLSLFullVRScene(const mitkGLSLFullVRScene&);
00223 void operator = (const mitkGLSLFullVRScene&);
00224
00225 private:
00226 mitkRCPtr<mitkICVolume> m_Data;
00227 mitkRCPtr<mitkRGBATransferFunction1D> m_TF;
00228
00229 mitkLocalVersion m_TFVersion;
00230
00231
00232
00233 mitkGLSLFullVR m_module;
00234
00235 bool m_glewInit;
00236 bool m_dataModified;
00237
00238 bool m_RotateLightDirection;
00239 bool m_RotatingLightDirection;
00240
00241 mitkVis2Vector4 m_OldLightDirection;
00242
00243
00244 };
00245
00246 #endif