Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6726 was 6695, checked in by patrick, 19 years ago

merged the network branche to the trunk

File size: 1.5 KB
RevLine 
[4597]1/*!
[6455]2 * @file water.h
[5357]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.
[3416]7*/
8
[6455]9#ifndef _WATER_H
10#define _WATER_H
[3416]11
[3419]12/* INCLUDES */
[3502]13#include "world_entity.h"
[3411]14
[5405]15/* FORWARD DECLARATION */
[5511]16class Material;
[6455]17class Grid;
[6467]18class Shader;
[3419]19
[6455]20//! A Class to handle a WaterEffects
21class Water : public WorldEntity
[3411]22{
[3416]23 public:
[6455]24   Water(const TiXmlElement* root = NULL);
25   ~Water();
[4010]26
[6455]27   void loadParams(const TiXmlElement* root);
[3419]28
[6455]29   void setResolution(unsigned int resX, unsigned int resY);
30   void setSize(float sizeX, float sizeY);
[6458]31   void setHeight(float height);
[6455]32   void rebuildGrid();
[4680]33
[6457]34   void draw() const;
[6456]35   void tick(float dt);
36
[6695]37   virtual int writeBytes(const byte* data, int length, int sender);
38   virtual int readBytes(byte* data, int maxLength, int * reciever);
39
40   int writeState( const byte * data, int length, int sender );
41   int readState( byte * data, int maxLength );
42
43
[6455]44  private:
45    Grid*           grid;            //!< The water-surface-model to render with
[6518]46    float**         velocities;      //!< Velocities.
47    float           viscosity;       //!< Viscosity (bigger more like honey, smaller more like water).
48    float           cohesion;        //!< Cohesion.
49
[6457]50    Material*       waterMaterial;
[6467]51    Shader*         waterShader;
[6458]52    float           height;          //!< The hight of the Water
[4261]53
[6455]54    unsigned int    resX, resY;
55    float           sizeX, sizeY;
[6457]56
57    float phase;
[3411]58};
59
[6455]60#endif  /* _WATER_H */
[3411]61
62
[3484]63
Note: See TracBrowser for help on using the repository browser.