Eulerian Smoke Simulation on the GPU
|
00001 #ifndef __VOLUME_SLICER_H__ 00002 #define __VOLUME_SLICER_H__ 00003 00004 //----------------------------------------------------------- 00007 //----------------------------------------------------------- 00008 00009 #include <ngl/TransformStack.h> 00010 #include <ngl/Matrix.h> 00011 #include "GLUtil.h" 00012 #include "Texture3D.h" 00013 #include "VertexArrayObject.h" 00014 00022 class VolumeSlicer 00023 { 00024 public: 00026 VolumeSlicer(); 00027 00029 ~VolumeSlicer(); 00030 00032 void init(); 00033 00037 void passViewProjectionMatrix( 00038 ngl::Matrix _modelView, 00039 ngl::Matrix _projection 00040 ); 00041 00045 void drawSlice( 00046 Texture3D* _texture3D, 00047 ngl::TransformStack &_transformStack 00048 ); 00049 00052 void setSlice( 00053 int _slice 00054 ); 00055 00058 void setOpacity( 00059 float _opacity 00060 ); 00061 00062 private: 00064 VertexArrayObject* m_planeVAO; 00065 00067 int m_slice; 00068 00070 float m_opacity; 00071 }; 00072 00073 #endif // __VOLUME_SLICER_H__