Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7810 in orxonox.OLD for trunk/src/lib/graphics/effects/fog_effect.h


Ignore:
Timestamp:
May 24, 2006, 3:57:04 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the Weather effects back here

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/fog_effect.h

    r7221 r7810  
    11/**
    2  * @file fog_effect.h
    3  *  atmospheric fog
    4  */
     2* @file fog_effect.h
     3*/
    54
    65#ifndef _FOG_EFFECT
     
    87
    98#include "vector.h"
    10 #include "graphics_effect.h"
    119
    12 class TiXmlElement;
     10#include "weather_effect.h"
    1311
    14 //! A class that handles FogEffects. The FogEffectManager operates on this.
    15 class FogEffect : public GraphicsEffect
     12class FogEffect : public WeatherEffect
    1613{
    17   public:
    18     FogEffect(const TiXmlElement* root = NULL);
    19     virtual ~FogEffect();
     14        public:
     15                FogEffect(const TiXmlElement* root = NULL);
     16                virtual ~FogEffect();
    2017
    21     virtual void loadParams(const TiXmlElement* root);
     18                virtual void loadParams(const TiXmlElement* root);
    2219
    23     virtual bool init();
     20                virtual bool init();
    2421
    25     virtual bool activate();
    26     virtual bool deactivate();
     22                virtual bool activate();
     23                virtual bool deactivate();
    2724
    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); }
     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); }
    3229
     30        private:
     31                GLint stringToFogMode(const std::string& mode);
    3332
    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;
    4439};
    4540
    4641
    47 #endif /* _FOG_EFFECT */
     42#endif  /* _FOG_EFFECT */
Note: See TracChangeset for help on using the changeset viewer.