Changeset 8023 in orxonox.OLD for branches/atmospheric_engine
- Timestamp:
- May 31, 2006, 1:16:43 PM (18 years ago)
- Location:
- branches/atmospheric_engine/src/lib/graphics/effects
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.cc
r7810 r8023 20 20 #include "glincl.h" 21 21 22 /*#include "shell_command.h" 23 SHELL_COMMAND(activateFog, FogEffect, FogEffect::activate) 24 ->setAlias("aFog"); 25 SHELL_COMMAND(deactivateFog, FogEffect, FogEffect::deactivate) 26 ->setAlias("dFog");*/ 22 #include "shell_command.h" 23 24 SHELL_COMMAND(activate, FogEffect, activateFog); 25 SHELL_COMMAND(deactivate, FogEffect, deactivateFog); 27 26 28 27 using namespace std; … … 39 38 this->loadParams(root); 40 39 41 this->activate(); 40 if( this->fogActivate ) 41 this->activate(); 42 42 } 43 43 … … 57 57 LoadParam(root, "range", this, FogEffect, setFogRange); 58 58 LoadParam(root, "color", this, FogEffect, setFogColor); 59 LoadParam(root, "option", this, FogEffect, setFogOption); 59 60 } 60 61 … … 62 63 { 63 64 //default values 65 this->fogActivate = false; 64 66 this->fogMode = GL_EXP2; 65 67 this->fogDensity = 0.001; -
branches/atmospheric_engine/src/lib/graphics/effects/fog_effect.h
r7810 r8023 22 22 virtual bool activate(); 23 23 virtual bool deactivate(); 24 25 void activateFog() { this->activate(); } 26 void deactivateFog() { this->deactivate(); } 24 27 25 28 inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } … … 27 30 inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } 28 31 inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } 32 inline void setFogOption(const std::string& option) { if (option == "activate") this->fogActivate = true; } 29 33 30 34 private: … … 37 41 GLfloat fogEnd; 38 42 Vector colorVector; 43 bool fogActivate; 39 44 }; 40 45 -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r8020 r8023 153 153 } 154 154 155 void RainEffect::activateRain()156 {157 this->activate();158 }159 160 void RainEffect::deactivateRain()161 {162 this->deactivate();163 }164 165 166 155 void RainEffect::tick (float dt) 167 156 { -
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
r8020 r8023 34 34 virtual bool deactivate(); 35 35 36 void activateRain(); 37 void deactivateRain(); 36 void activateRain() { this->activate(); } 37 void deactivateRain() { this->deactivate(); } 38 38 39 39 virtual void tick(float dt); -
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc
r8022 r8023 159 159 } 160 160 161 void SnowEffect::activateSnow()162 {163 this->activate();164 }165 166 void SnowEffect::deactivateSnow()167 {168 this->deactivate();169 }170 171 161 void SnowEffect::draw() const 172 162 { -
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
r8022 r8023 36 36 virtual void tick(float dt); 37 37 38 void activateSnow(); 39 void deactivateSnow(); 38 void activateSnow() { this->activate(); } 39 void deactivateSnow() { this->deactivate(); } 40 40 41 41 inline void numParticles(int n) { this->particles = n; }
Note: See TracChangeset
for help on using the changeset viewer.