Last change
on this file since 7649 was
7646,
checked in by amaechler, 18 years ago
|
branches/atmospheric_engine: added loop function in sound_source
|
File size:
1.3 KB
|
Rev | Line | |
---|
[7561] | 1 | /** |
---|
| 2 | * @file rain_effect.h |
---|
| 3 | */ |
---|
| 4 | |
---|
| 5 | #ifndef _RAIN_EFFECT |
---|
| 6 | #define _RAIN_EFFECT |
---|
| 7 | |
---|
[7562] | 8 | #include "vector.h" |
---|
[7628] | 9 | #include "vector2D.h" |
---|
| 10 | |
---|
[7561] | 11 | #include "particle_system.h" |
---|
| 12 | |
---|
[7577] | 13 | class SparkParticles; |
---|
[7628] | 14 | class PlainEmitter; |
---|
[7577] | 15 | |
---|
[7561] | 16 | #include "weather_effect.h" |
---|
| 17 | |
---|
[7646] | 18 | #include "sound_buffer.h" |
---|
| 19 | #include "sound_source.h" |
---|
[7562] | 20 | |
---|
[7646] | 21 | |
---|
[7561] | 22 | class 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 | |
---|
[7646] | 35 | virtual void tick(float dt); |
---|
| 36 | |
---|
[7628] | 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;} |
---|
[7646] | 40 | inline void setRainVelocity(float velocity) { this->rainVelocity = -velocity; } |
---|
[7561] | 41 | |
---|
| 42 | private: |
---|
[7577] | 43 | static SparkParticles* rainParticles; |
---|
| 44 | ParticleEmitter* emitter; |
---|
| 45 | |
---|
[7628] | 46 | Vector rainCoord; |
---|
| 47 | Vector2D rainSize; |
---|
| 48 | GLfloat rainRate; |
---|
| 49 | GLfloat rainVelocity; |
---|
[7646] | 50 | |
---|
| 51 | SoundSource soundSource; |
---|
| 52 | SoundBuffer* rainBuffer; |
---|
[7561] | 53 | }; |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | #endif /* _RAIN_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.