Changeset 7810 in orxonox.OLD for trunk/src/lib/graphics/effects/fog_effect.h
- Timestamp:
- May 24, 2006, 3:57:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/effects/fog_effect.h
r7221 r7810 1 1 /** 2 * @file fog_effect.h 3 * atmospheric fog 4 */ 2 * @file fog_effect.h 3 */ 5 4 6 5 #ifndef _FOG_EFFECT … … 8 7 9 8 #include "vector.h" 10 #include "graphics_effect.h"11 9 12 class TiXmlElement; 10 #include "weather_effect.h" 13 11 14 //! A class that handles FogEffects. The FogEffectManager operates on this. 15 class FogEffect : public GraphicsEffect 12 class FogEffect : public WeatherEffect 16 13 { 17 18 19 14 public: 15 FogEffect(const TiXmlElement* root = NULL); 16 virtual ~FogEffect(); 20 17 21 18 virtual void loadParams(const TiXmlElement* root); 22 19 23 20 virtual bool init(); 24 21 25 26 22 virtual bool activate(); 23 virtual bool deactivate(); 27 24 28 29 30 31 25 inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } 26 inline void setFogDensity(float density) { this->fogDensity = density; } 27 inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } 28 inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } 32 29 30 private: 31 GLint stringToFogMode(const std::string& mode); 33 32 34 private: 35 GLint stringToFogMode(const std::string& mode); 36 37 38 private: 39 GLint fogMode; 40 GLfloat fogDensity; 41 GLfloat fogStart; 42 GLfloat fogEnd; 43 Vector colorVector; 33 private: 34 GLint fogMode; 35 GLfloat fogDensity; 36 GLfloat fogStart; 37 GLfloat fogEnd; 38 Vector colorVector; 44 39 }; 45 40 46 41 47 #endif /* _FOG_EFFECT */42 #endif /* _FOG_EFFECT */
Note: See TracChangeset
for help on using the changeset viewer.