Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/src/lib/graphics/effects/fog_effect.h @ 7479

Last change on this file since 7479 was 7221, checked in by bensch, 19 years ago

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File size: 1.2 KB
Line 
1/**
2 * @file fog_effect.h
3 *  atmospheric fog
4 */
5
6#ifndef _FOG_EFFECT
7#define _FOG_EFFECT
8
9#include "vector.h"
10#include "graphics_effect.h"
11
12class TiXmlElement;
13
14//! A class that handles FogEffects. The FogEffectManager operates on this.
15class 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();
27
28    inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); }
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); }
32
33
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;
44};
45
46
47#endif /* _FOG_EFFECT */
Note: See TracBrowser for help on using the repository browser.