Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7646 was 7646, checked in by amaechler, 19 years ago

branches/atmospheric_engine: added loop function in sound_source

File size: 1.3 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
42  private:
43    static SparkParticles*            rainParticles;
44    ParticleEmitter*                  emitter;
45
46    Vector                            rainCoord;
47    Vector2D                          rainSize;
48    GLfloat                           rainRate;
49    GLfloat                           rainVelocity;
50
51    SoundSource                       soundSource;
52    SoundBuffer*                      rainBuffer;
53};
54
55
56#endif  /* _RAIN_EFFECT */
Note: See TracBrowser for help on using the repository browser.