Last change
on this file since 6483 was
6467,
checked in by bensch, 19 years ago
|
orxonox/trunk: Texture loading with GL_TEXTURE_* in ResourceManager and Material
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file water.h |
---|
3 | * Definition of the SkyBox, that handles the Display of an atmosphere for orxonox. |
---|
4 | * |
---|
5 | * A SkyBox is always centered at the current working Camera, and will only obey the cameras |
---|
6 | * movment but not its rotation. |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef _WATER_H |
---|
10 | #define _WATER_H |
---|
11 | |
---|
12 | /* INCLUDES */ |
---|
13 | #include "world_entity.h" |
---|
14 | |
---|
15 | /* FORWARD DECLARATION */ |
---|
16 | class Material; |
---|
17 | class Grid; |
---|
18 | class Shader; |
---|
19 | |
---|
20 | //! A Class to handle a WaterEffects |
---|
21 | class Water : public WorldEntity |
---|
22 | { |
---|
23 | public: |
---|
24 | Water(const TiXmlElement* root = NULL); |
---|
25 | ~Water(); |
---|
26 | |
---|
27 | void loadParams(const TiXmlElement* root); |
---|
28 | |
---|
29 | void setResolution(unsigned int resX, unsigned int resY); |
---|
30 | void setSize(float sizeX, float sizeY); |
---|
31 | void setHeight(float height); |
---|
32 | void rebuildGrid(); |
---|
33 | |
---|
34 | void draw() const; |
---|
35 | void tick(float dt); |
---|
36 | |
---|
37 | private: |
---|
38 | Grid* grid; //!< The water-surface-model to render with |
---|
39 | Material* waterMaterial; |
---|
40 | Shader* waterShader; |
---|
41 | float height; //!< The hight of the Water |
---|
42 | |
---|
43 | unsigned int resX, resY; |
---|
44 | float sizeX, sizeY; |
---|
45 | |
---|
46 | float phase; |
---|
47 | }; |
---|
48 | |
---|
49 | #endif /* _WATER_H */ |
---|
50 | |
---|
51 | |
---|
52 | |
---|
Note: See
TracBrowser
for help on using the repository browser.