Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/environments/water.h @ 6691

Last change on this file since 6691 was 6518, checked in by bensch, 19 years ago

orxonox/trunk: some waves

File size: 1.3 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 */
16class Material;
17class Grid;
18class Shader;
19
20//! A Class to handle a WaterEffects
21class 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    float**         velocities;      //!< Velocities.
40    float           viscosity;       //!< Viscosity (bigger more like honey, smaller more like water).
41    float           cohesion;        //!< Cohesion.
42
43    Material*       waterMaterial;
44    Shader*         waterShader;
45    float           height;          //!< The hight of the Water
46
47    unsigned int    resX, resY;
48    float           sizeX, sizeY;
49
50    float phase;
51};
52
53#endif  /* _WATER_H */
54
55
56
Note: See TracBrowser for help on using the repository browser.