Last change
on this file since 8423 was
8362,
checked in by bensch, 18 years ago
|
orxonox/trunk: removed stupid included in base_object.h
this should lead to faster compile-times
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6741] | 1 | /** |
---|
[7810] | 2 | * @file fog_effect.h |
---|
| 3 | */ |
---|
[6741] | 4 | |
---|
| 5 | #ifndef _FOG_EFFECT |
---|
| 6 | #define _FOG_EFFECT |
---|
| 7 | |
---|
[7107] | 8 | #include "vector.h" |
---|
[6741] | 9 | |
---|
[7810] | 10 | #include "weather_effect.h" |
---|
[8362] | 11 | #include "glincl.h" |
---|
[6741] | 12 | |
---|
[8362] | 13 | |
---|
[7810] | 14 | class FogEffect : public WeatherEffect |
---|
[6741] | 15 | { |
---|
[7810] | 16 | public: |
---|
| 17 | FogEffect(const TiXmlElement* root = NULL); |
---|
| 18 | virtual ~FogEffect(); |
---|
[6741] | 19 | |
---|
[7810] | 20 | virtual void loadParams(const TiXmlElement* root); |
---|
[6741] | 21 | |
---|
[7810] | 22 | virtual bool init(); |
---|
[6741] | 23 | |
---|
[7810] | 24 | virtual bool activate(); |
---|
| 25 | virtual bool deactivate(); |
---|
[6772] | 26 | |
---|
[8255] | 27 | void activateFog() { this->activate(); } |
---|
| 28 | void deactivateFog() { this->deactivate(); } |
---|
| 29 | |
---|
| 30 | virtual void draw() const; |
---|
| 31 | virtual void tick(float dt); |
---|
| 32 | |
---|
[7810] | 33 | inline void setFogMode(const std::string& mode) { this->fogMode = this->stringToFogMode(mode); } |
---|
| 34 | inline void setFogDensity(float density) { this->fogDensity = density; } |
---|
| 35 | inline void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; } |
---|
| 36 | inline void setFogColor(float r, float g, float b) { this->colorVector = Vector(r, g, b); } |
---|
[8255] | 37 | inline void setFogOption(const std::string& option) { if (option == "activate") this->fogActivate = true; } |
---|
[6772] | 38 | |
---|
[8255] | 39 | void startFogging(); |
---|
| 40 | |
---|
[7810] | 41 | private: |
---|
| 42 | GLint stringToFogMode(const std::string& mode); |
---|
[6772] | 43 | |
---|
[8255] | 44 | bool fogActivate; |
---|
| 45 | GLfloat fogFadeDuration; |
---|
| 46 | float localTimer; |
---|
[8362] | 47 | |
---|
[8255] | 48 | GLint fogMode; |
---|
| 49 | GLfloat fogDensity; |
---|
| 50 | GLfloat fogFadeDensity; |
---|
| 51 | |
---|
| 52 | GLfloat fogStart; |
---|
| 53 | GLfloat fogEnd; |
---|
| 54 | Vector colorVector; |
---|
[6741] | 55 | }; |
---|
| 56 | |
---|
| 57 | |
---|
[7810] | 58 | #endif /* _FOG_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.