Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

trunk: fog patch

File size: 1.1 KB
RevLine 
[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
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();
[6772]27
[7107]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); }
[6772]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;
[7107]43    Vector                  colorVector;
[6741]44};
45
46
47#endif /* _FOG_EFFECT */
Note: See TracBrowser for help on using the repository browser.