Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h @ 7682

Last change on this file since 7682 was 7682, checked in by amaechler, 18 years ago

branches/atmosphere_engine: wind, rain changes

File size: 1.6 KB
Line 
1/**
2* @file rain_effect.h
3*/
4
5#ifndef _RAIN_EFFECT
6#define _RAIN_EFFECT
7
8#include "vector.h"
9#include "vector2D.h"
10
11#include "particle_system.h"
12
13class SparkParticles;
14class PlainEmitter;
15
16#include "weather_effect.h"
17
18#include "sound_buffer.h"
19#include "sound_source.h"
20
21
22class RainEffect : public WeatherEffect
23{
24        public:
25                RainEffect(const TiXmlElement* root = NULL);
26                virtual ~RainEffect();
27
28                virtual void loadParams(const TiXmlElement* root);
29
30                virtual bool init();
31
32                virtual bool activate();
33                virtual bool deactivate();
34
35                virtual void tick(float dt);
36
37                inline void setRainCoord(float x, float y, float z) { this->rainCoord = Vector(x, y, z); }
38                inline void setRainSize(float x, float y) { this->rainSize = Vector2D(x, y); }
39                inline void setRainRate(float rate) { this->rainRate = rate;}
40                inline void setRainVelocity(float velocity) { this->rainVelocity = -velocity; }
41                inline void setRainLife(float life) { this->rainLife = life; }
42                inline void setRainWind(int force) { this->rainWindForce = force; }
43
44                inline void setRainOption(string option) { 
45                        PRINTF(0)( "setting move true\n");
46                        this->rainMove = true;
47                }
48
49
50        private:
51                static SparkParticles*                                          rainParticles;
52                ParticleEmitter*                                                                        emitter;
53
54                Vector                                                                                                          rainCoord;
55                Vector2D                                                                                                        rainSize;
56                GLfloat                                                                                                         rainRate;
57                GLfloat                                                                                                         rainVelocity;
58                GLfloat                                                                                                         rainLife;
59                GLfloat                                                                                                         rainMaxParticles;
60                int                                                                                                                             rainWindForce;
61                bool                                                                                                                    rainMove;
62
63                SoundSource                                                                                             soundSource;
64                SoundBuffer*                                                                                    rainBuffer;
65};
66
67
68#endif  /* _RAIN_EFFECT */
Note: See TracBrowser for help on using the repository browser.