Last change
on this file since 7504 was
7504,
checked in by amaechler, 18 years ago
|
branches/atmospheric_engine: Added volumetric fogeffect files
|
File size:
1.0 KB
|
Rev | Line | |
---|
[7504] | 1 | /** |
---|
| 2 | * @file fog_effect.h |
---|
| 3 | */ |
---|
| 4 | |
---|
| 5 | #ifndef _FOG_EFFECT |
---|
| 6 | #define _FOG_EFFECT |
---|
| 7 | |
---|
| 8 | #include "vector.h" |
---|
| 9 | |
---|
| 10 | #include "weather_effect.h" |
---|
| 11 | |
---|
| 12 | class FogEffect : public WeatherEffect |
---|
| 13 | { |
---|
| 14 | public: |
---|
| 15 | FogEffect(const TiXmlElement* root = NULL); |
---|
| 16 | virtual ~FogEffect(); |
---|
| 17 | |
---|
| 18 | virtual void loadParams(const TiXmlElement* root); |
---|
| 19 | |
---|
| 20 | virtual bool init(); |
---|
| 21 | |
---|
| 22 | virtual bool activate(); |
---|
| 23 | virtual bool deactivate(); |
---|
| 24 | |
---|
| 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); } |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | private: |
---|
| 32 | GLint stringToFogMode(const std::string& mode); |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | private: |
---|
| 36 | GLint fogMode; |
---|
| 37 | GLfloat fogDensity; |
---|
| 38 | GLfloat fogStart; |
---|
| 39 | GLfloat fogEnd; |
---|
| 40 | Vector colorVector; |
---|
| 41 | }; |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | #endif /* _FOG_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.