Changeset 8457 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
- Timestamp:
- Jun 15, 2006, 1:43:24 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
r8455 r8457 22 22 23 23 24 class RainEffect : public WeatherEffect 25 { 26 public: 27 RainEffect(const TiXmlElement* root = NULL); 28 virtual ~RainEffect(); 24 class RainEffect : public WeatherEffect { 25 public: 26 RainEffect(const TiXmlElement* root = NULL); 27 virtual ~RainEffect(); 29 28 30 29 virtual void loadParams(const TiXmlElement* root); 31 30 32 31 virtual void init(); 33 32 34 35 33 virtual void activate(); 34 virtual void deactivate(); 36 35 37 inline void activateRain() { this->activate(); } 38 inline void deactivateRain() { this->deactivate(); } 36 inline void activateRain() { 37 this->activate(); 38 } 39 inline void deactivateRain() { 40 this->deactivate(); 41 } 39 42 40 43 virtual void tick(float dt); 41 44 42 43 45 void startRaining(); 46 void stopRaining(); 44 47 45 inline void setRainCoord(float x, float y, float z) { this->rainCoord = Vector(x, y, z); } 46 inline void setRainSize(float x, float y) { this->rainSize = Vector2D(x, y); } 47 inline void setRainRate(float rate) { this->rainRate = rate;} 48 inline void setRainVelocity(float velocity) { this->rainVelocity = -velocity; } 49 inline void setRainLife(float life) { this->rainLife = life; } 50 inline void setRainWind(int force) { this->rainWindForce = force; } 48 inline void setRainCoord(float x, float y, float z) { 49 this->rainCoord = Vector(x, y, z); 50 } 51 inline void setRainSize(float x, float y) { 52 this->rainSize = Vector2D(x, y); 53 } 54 inline void setRainRate(float rate) { 55 this->rainRate = rate; 56 } 57 inline void setRainVelocity(float velocity) { 58 this->rainVelocity = -velocity; 59 } 60 inline void setRainLife(float life) { 61 this->rainLife = life; 62 } 63 inline void setRainWind(int force) { 64 this->rainWindForce = force; 65 } 51 66 52 inline void setRainFadeIn(float fadein) { this->rainFadeInDuration = fadein; } 53 inline void setRainFadeOut(float fadeout) { this->rainFadeOutDuration = fadeout; } 67 inline void setRainFadeIn(float fadein) { 68 this->rainFadeInDuration = fadein; 69 } 70 inline void setRainFadeOut(float fadeout) { 71 this->rainFadeOutDuration = fadeout; 72 } 54 73 55 inline void setRainOption(const std::string& option) { 56 if (option == "moverain") this->rainMove = true; 57 if (option == "activate") this->rainActivate = true; 58 } 74 inline void setRainOption(const std::string& option) { 75 if (option == "moverain") 76 this->rainMove = true; 77 if (option == "activate") 78 this->rainActivate = true; 79 } 59 80 60 81 61 62 static SparkParticles*rainParticles;63 ParticleEmitter*emitter;82 private: 83 static SparkParticles* rainParticles; 84 ParticleEmitter* emitter; 64 85 65 GLfloatrainFadeInDuration;66 GLfloatrainFadeOutDuration;67 floatlocalTimer;86 GLfloat rainFadeInDuration; 87 GLfloat rainFadeOutDuration; 88 float localTimer; 68 89 69 VectorrainCoord;70 Vector2DrainSize;71 GLfloatrainRate;72 GLfloatrainVelocity;73 GLfloatrainLife;74 GLfloatrainMaxParticles;75 intrainWindForce;76 boolrainMove;77 boolrainActivate;90 Vector rainCoord; 91 Vector2D rainSize; 92 GLfloat rainRate; 93 GLfloat rainVelocity; 94 GLfloat rainLife; 95 GLfloat rainMaxParticles; 96 int rainWindForce; 97 bool rainMove; 98 bool rainActivate; 78 99 79 OrxSound::SoundSourcesoundSource;80 OrxSound::SoundBuffer*rainBuffer;81 OrxSound::SoundBuffer*windBuffer;100 OrxSound::SoundSource soundSource; 101 OrxSound::SoundBuffer* rainBuffer; 102 OrxSound::SoundBuffer* windBuffer; 82 103 83 floatsoundRainVolume;104 float soundRainVolume; 84 105 85 LightManager*lightMan;86 GLfloatrainAmbient;106 LightManager* lightMan; 107 GLfloat rainAmbient; 87 108 88 109 };
Note: See TracChangeset
for help on using the changeset viewer.