GlobeEngine
ScreenSpaceDecal.h
Go to the documentation of this file.
1 
7 #ifndef GlobeEngine_ScreenSpaceDecal_h
8 #define GlobeEngine_ScreenSpaceDecal_h
9 
10 #include "Cube.h"
11 #include "Camera.h"
12 #include "Texture.h"
13 
14 namespace ge {
15 
16  class ScreenSpaceDecal : public ge::Cube
17  {
18 
19  public:
22 
23  void draw(std::shared_ptr<ge::Camera> _cam, int _mode, float _sliceNumber = 0.0);
24 
25  void setGBufferHandle(std::shared_ptr<ge::TextureHandle> _gBufferHandle) {
26  this->gBufferHandle = _gBufferHandle;
27  }
28 
29  void setViewport(vmml::Vector2i _viewport) {
30  this->viewport = _viewport;
31  }
32 
33  void setTexture2D(GLuint _textureHandle) {
34  this->texture2D = _textureHandle;
35  }
36 
37  void setTexture3D(GLuint _textureHandle) {
38  this->texture3D = _textureHandle;
39  }
40 
41  private:
42  using ge::DrawableComponent::draw; // implicitly hidden
43  using ge::Cube::draw; // implicitly hidden
44 
45  std::shared_ptr<ge::TextureHandle> gBufferHandle;
46  vmml::Vector2i viewport;
47 
48  GLuint texture2D;
49  GLuint texture3D;
50  };
51 
52 }
53 #endif
void draw(std::shared_ptr< ge::Camera > _cam, int _mode, float _sliceNumber=0.0)
Definition: ScreenSpaceDecal.cpp:13
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: Cube.cpp:55
void setTexture3D(GLuint _textureHandle)
Definition: ScreenSpaceDecal.h:37
Definition: Cube.h:14
virtual void draw(std::shared_ptr< ge::Camera > _cam)
Definition: DrawableComponent.cpp:76
void setGBufferHandle(std::shared_ptr< ge::TextureHandle > _gBufferHandle)
Definition: ScreenSpaceDecal.h:25
Definition: ScreenSpaceDecal.h:16
Definition: AvalancheTrainingSimulationEngine.h:28
void setTexture2D(GLuint _textureHandle)
Definition: ScreenSpaceDecal.h:33
void setViewport(vmml::Vector2i _viewport)
Definition: ScreenSpaceDecal.h:29
ScreenSpaceDecal()
Definition: ScreenSpaceDecal.cpp:5
~ScreenSpaceDecal()
Definition: ScreenSpaceDecal.cpp:11