| 
                Last change
                  on this file since 7652 was
                  7652,
                  checked in by amaechler, 19 years ago
           | 
        
        
          | 
               
branches/atmosphere_engine: cosmetics2 
 
           | 
        
        | 
            File size:
            1.4 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 |  | 
|---|
| 13 | class SparkParticles; | 
|---|
| 14 | class PlainEmitter; | 
|---|
| 15 |  | 
|---|
| 16 | #include "weather_effect.h" | 
|---|
| 17 |  | 
|---|
| 18 | #include "sound_buffer.h" | 
|---|
| 19 | #include "sound_source.h" | 
|---|
| 20 |  | 
|---|
| 21 |  | 
|---|
| 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 |  | 
|---|
| 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 setMoveRain() { PRINTF(0)( "setting move true\n"); this->rainMove = true; } | 
|---|
| 43 |  | 
|---|
| 44 |  | 
|---|
| 45 |         private: | 
|---|
| 46 |                 static SparkParticles*                                          rainParticles; | 
|---|
| 47 |                 ParticleEmitter*                                                                        emitter; | 
|---|
| 48 |  | 
|---|
| 49 |                 Vector                                                                                                          rainCoord; | 
|---|
| 50 |                 Vector2D                                                                                                        rainSize; | 
|---|
| 51 |                 GLfloat                                                                                                         rainRate; | 
|---|
| 52 |                 GLfloat                                                                                                         rainVelocity; | 
|---|
| 53 |                 GLfloat                                                                                                         rainLife; | 
|---|
| 54 |                 bool                                                                                                                    rainMove; | 
|---|
| 55 |  | 
|---|
| 56 |                 SoundSource                                                                                             soundSource; | 
|---|
| 57 |                 SoundBuffer*                                                                                    rainBuffer; | 
|---|
| 58 | }; | 
|---|
| 59 |  | 
|---|
| 60 |  | 
|---|
| 61 | #endif  /* _RAIN_EFFECT */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.