| Line |   | 
|---|
| 1 | /*! | 
|---|
| 2 |  * @file mapped_water.h | 
|---|
| 3 |  * | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _MAPPED_WATER_H | 
|---|
| 7 | #define _MAPPED_WATER_H | 
|---|
| 8 |  | 
|---|
| 9 | /* INCLUDES */ | 
|---|
| 10 | #include "world_entity.h" | 
|---|
| 11 | #include "material.h" | 
|---|
| 12 | #include "texture.h" | 
|---|
| 13 | #include "shader.h" | 
|---|
| 14 |  | 
|---|
| 15 | class MappedWater : public WorldEntity | 
|---|
| 16 | { | 
|---|
| 17 |   public: | 
|---|
| 18 |     MappedWater(const TiXmlElement* root = NULL); | 
|---|
| 19 |     virtual ~MappedWater(); | 
|---|
| 20 |  | 
|---|
| 21 |     void loadParams(const TiXmlElement* root); | 
|---|
| 22 |  | 
|---|
| 23 |     void activateReflection(); | 
|---|
| 24 |     void deactivateReflection(); | 
|---|
| 25 |  | 
|---|
| 26 |     void activateRefraction(); | 
|---|
| 27 |     void deactivateRefraction(); | 
|---|
| 28 |  | 
|---|
| 29 |     void draw() const; | 
|---|
| 30 |     void tick(float dt); | 
|---|
| 31 |  | 
|---|
| 32 |   private: | 
|---|
| 33 |     void setHeight(float height); | 
|---|
| 34 |  | 
|---|
| 35 |   private: | 
|---|
| 36 |     float           waterHeight;       //!< y-coord of the Water | 
|---|
| 37 |     Material        mat; | 
|---|
| 38 |  | 
|---|
| 39 |     Texture         texture; | 
|---|
| 40 |     int             textureSize;       //!< size of the texture | 
|---|
| 41 |     Shader*         shader; | 
|---|
| 42 |  | 
|---|
| 43 | }; | 
|---|
| 44 |  | 
|---|
| 45 | #endif  /* _MAPPED_WATER_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.