Last change
on this file since 8018 was
7986,
checked in by stefalie, 18 years ago
|
branches/water: everything fine so far, but i need another TextureUnit
|
File size:
1.5 KB
|
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 | |
---|
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 setLightPosition(float x, float y, float z) { this->lightPos = Vector(x,y,z); }; |
---|
34 | void setHeight(float height); |
---|
35 | |
---|
36 | private: |
---|
37 | float waterHeight; //!< y-coord of the Water |
---|
38 | |
---|
39 | float move; //!< textures coords, speeds, positions for the shaded textures.... |
---|
40 | float move2; //!< |
---|
41 | float g_WaterUV; //!< |
---|
42 | float g_WaterFlow; //!< |
---|
43 | float refrUV; //!< |
---|
44 | float normalUV; //!< |
---|
45 | float kNormalMapScale; //!< |
---|
46 | |
---|
47 | int textureSize; //!< size of the texture |
---|
48 | Vector lightPos; |
---|
49 | Material mat; |
---|
50 | Shader* shader; |
---|
51 | Shader::Uniform* cam_uni; //!< uniform that is used for the camera position |
---|
52 | |
---|
53 | }; |
---|
54 | |
---|
55 | #endif /* _MAPPED_WATER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.