Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/effects/fog_effect.h @ 7107

Last change on this file since 7107 was 7107, checked in by patrick, 18 years ago

trunk: fog patch

File size: 1.1 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 char* mode) { this->fogMode = this->charToFogMode(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 charToFogMode(const char* 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.