Last change
on this file since 8383 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
|
Line | |
---|
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 | #include "glincl.h" |
---|
12 | |
---|
13 | |
---|
14 | class FogEffect : public WeatherEffect |
---|
15 | { |
---|
16 | public: |
---|
17 | FogEffect(const TiXmlElement* root = NULL); |
---|
18 | virtual ~FogEffect(); |
---|
19 | |
---|
20 | virtual void loadParams(const TiXmlElement* root); |
---|
21 | |
---|
22 | virtual bool init(); |
---|
23 | |
---|
24 | virtual bool activate(); |
---|
25 | virtual bool deactivate(); |
---|
26 | |
---|
27 | void activateFog() { this->activate(); } |
---|
28 | void deactivateFog() { this->deactivate(); } |
---|
29 | |
---|
30 | virtual void draw() const; |
---|
31 | virtual void tick(float dt); |
---|
32 | |
---|
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); } |
---|
37 | inline void setFogOption(const std::string& option) { if (option == "activate") this->fogActivate = true; } |
---|
38 | |
---|
39 | void startFogging(); |
---|
40 | |
---|
41 | private: |
---|
42 | GLint stringToFogMode(const std::string& mode); |
---|
43 | |
---|
44 | bool fogActivate; |
---|
45 | GLfloat fogFadeDuration; |
---|
46 | float localTimer; |
---|
47 | |
---|
48 | GLint fogMode; |
---|
49 | GLfloat fogDensity; |
---|
50 | GLfloat fogFadeDensity; |
---|
51 | |
---|
52 | GLfloat fogStart; |
---|
53 | GLfloat fogEnd; |
---|
54 | Vector colorVector; |
---|
55 | }; |
---|
56 | |
---|
57 | |
---|
58 | #endif /* _FOG_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.