Eulerian Smoke Simulation on the GPU
include/PingPongVolume.h
Go to the documentation of this file.
00001 #ifndef __PING_PONG_VOLUME_H__
00002 #define __PING_PONG_VOLUME_H__
00003 
00004 //---------------------------------------------------------------------
00007 //---------------------------------------------------------------------
00008 
00009 #include "GLUtil.h"
00010 #include "BufferObject.h"
00011 #include "Texture3D.h"
00012 
00021 class PingPongVolume
00022 {
00023 public:
00028   PingPongVolume(
00029                   int _width,
00030                   int _height,
00031                   int _depth,
00032                   int _samplerIndex
00033                 );
00034 
00036   ~PingPongVolume();
00037 
00039   void swap();
00040 
00043   void loadReadData(
00044                         void* _data
00045                       );
00046 
00049   void loadWriteData(
00050                       void* _data
00051                     );
00052 
00054   inline int getWidth() const {return m_width;}
00056   inline int getHeight() const {return m_height;}
00058   inline int getDepth() const {return m_depth;}
00059 
00061   inline Texture3D* getTexture() const {return m_texture3D;}
00063   inline BufferObject* getPbo() const {return m_pbo;}
00064 
00065 private:
00067   int m_width;
00069   int m_height;
00071   int m_depth;
00072 
00074   BufferObject* m_pbo;
00076   Texture3D* m_texture3D;
00077 };
00078 
00079 #endif // __PING_PONG_VOLUME_H__
 All Classes Files Functions Variables