| Rev | Line |   | 
|---|
| [6741] | 1 | /** | 
|---|
 | 2 |  * @file fog_effect.h | 
|---|
 | 3 |  *  atmospheric fog | 
|---|
 | 4 |  */ | 
|---|
 | 5 |  | 
|---|
 | 6 | #ifndef _FOG_EFFECT | 
|---|
 | 7 | #define _FOG_EFFECT | 
|---|
 | 8 |  | 
|---|
| [7107] | 9 | #include "vector.h" | 
|---|
| [6741] | 10 | #include "graphics_effect.h" | 
|---|
 | 11 |  | 
|---|
 | 12 | class TiXmlElement; | 
|---|
 | 13 |  | 
|---|
 | 14 | //! A class that handles FogEffects. The FogEffectManager operates on this. | 
|---|
 | 15 | class FogEffect : public GraphicsEffect | 
|---|
 | 16 | { | 
|---|
 | 17 |   public: | 
|---|
 | 18 |     FogEffect(const TiXmlElement* root = NULL); | 
|---|
 | 19 |     virtual ~FogEffect(); | 
|---|
 | 20 |  | 
|---|
 | 21 |     virtual void loadParams(const TiXmlElement* root); | 
|---|
 | 22 |  | 
|---|
 | 23 |     virtual bool init(); | 
|---|
 | 24 |  | 
|---|
 | 25 |     virtual bool activate(); | 
|---|
 | 26 |     virtual bool deactivate(); | 
|---|
| [6772] | 27 |  | 
|---|
| [7221] | 28 |     inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } | 
|---|
| [7107] | 29 |     inline void setFogDensity(float density) { this->fogDensity = density; } | 
|---|
 | 30 |     inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } | 
|---|
 | 31 |     inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } | 
|---|
| [6772] | 32 |  | 
|---|
 | 33 |  | 
|---|
 | 34 |   private: | 
|---|
| [7221] | 35 |     GLint stringToFogMode(const std::string& mode); | 
|---|
| [6772] | 36 |  | 
|---|
 | 37 |  | 
|---|
 | 38 |   private: | 
|---|
 | 39 |     GLint                   fogMode; | 
|---|
 | 40 |     GLfloat                 fogDensity; | 
|---|
 | 41 |     GLfloat                 fogStart; | 
|---|
 | 42 |     GLfloat                 fogEnd; | 
|---|
| [7107] | 43 |     Vector                  colorVector; | 
|---|
| [6741] | 44 | }; | 
|---|
 | 45 |  | 
|---|
 | 46 |  | 
|---|
 | 47 | #endif /* _FOG_EFFECT */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.