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 "shader.h" |
---|
13 | |
---|
14 | class MappedWater : public WorldEntity |
---|
15 | { |
---|
16 | public: |
---|
17 | MappedWater(const TiXmlElement* root = NULL); |
---|
18 | virtual ~MappedWater(); |
---|
19 | |
---|
20 | void loadParams(const TiXmlElement* root); |
---|
21 | |
---|
22 | void activateReflection(); |
---|
23 | void deactivateReflection(); |
---|
24 | |
---|
25 | void activateRefraction(); |
---|
26 | void deactivateRefraction(); |
---|
27 | |
---|
28 | void draw() const; |
---|
29 | void tick(float dt); |
---|
30 | |
---|
31 | private: |
---|
32 | void setHeight(float height); |
---|
33 | |
---|
34 | private: |
---|
35 | float waterHeight; //!< y-coord of the Water |
---|
36 | |
---|
37 | float move; //!< textures coords, speeds, positions for the shaded textures.... |
---|
38 | float move2; //!< |
---|
39 | float g_WaterUV; //!< |
---|
40 | float g_WaterFlow; //!< |
---|
41 | float refrUV; //!< |
---|
42 | float normalUV; //!< |
---|
43 | float kNormalMapScale; //!< |
---|
44 | |
---|
45 | int textureSize; //!< size of the texture |
---|
46 | Material mat; |
---|
47 | Shader* shader; |
---|
48 | Shader::Uniform* uni; |
---|
49 | |
---|
50 | }; |
---|
51 | |
---|
52 | #endif /* _MAPPED_WATER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.