Line | |
---|
1 | /** |
---|
2 | * @file cloud_effect.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _CLOUD_EFFECT |
---|
6 | #define _CLOUD_EFFECT |
---|
7 | |
---|
8 | #include "weather_effect.h" |
---|
9 | |
---|
10 | #include "sound_buffer.h" |
---|
11 | #include "sound_source.h" |
---|
12 | |
---|
13 | #include "world_entity.h" |
---|
14 | #include "glincl.h" |
---|
15 | |
---|
16 | #include "sglmodel.h" |
---|
17 | |
---|
18 | class Shader; |
---|
19 | class Material; |
---|
20 | class Vector; |
---|
21 | |
---|
22 | class CloudEffect : public WeatherEffect |
---|
23 | { |
---|
24 | public: |
---|
25 | CloudEffect(const TiXmlElement* root = NULL); |
---|
26 | virtual ~CloudEffect(); |
---|
27 | |
---|
28 | virtual void loadParams(const TiXmlElement* root); |
---|
29 | |
---|
30 | virtual bool init(); |
---|
31 | |
---|
32 | virtual bool activate(); |
---|
33 | virtual bool deactivate(); |
---|
34 | |
---|
35 | inline void activateCloud() { this->activate(); } |
---|
36 | inline void deactivateCloud() { this->deactivate(); } |
---|
37 | |
---|
38 | virtual void draw() const; |
---|
39 | virtual void tick(float dt); |
---|
40 | |
---|
41 | inline void setCloudOption(const std::string& option) { |
---|
42 | if (option == "activate") this->cloudActivate = true; |
---|
43 | } |
---|
44 | |
---|
45 | |
---|
46 | private: |
---|
47 | void initialize(char* fileName); |
---|
48 | |
---|
49 | bool cloudActivate; |
---|
50 | |
---|
51 | Material* cloudMaterial; // A Material for the Sphere. |
---|
52 | |
---|
53 | std::string cloudTexture; |
---|
54 | |
---|
55 | Sglmodel_sgl cloudModel; |
---|
56 | Shader* cloudShader; |
---|
57 | |
---|
58 | GLfloat cloudTint[4]; |
---|
59 | GLfloat cloudScroll; |
---|
60 | |
---|
61 | float time; |
---|
62 | |
---|
63 | }; |
---|
64 | |
---|
65 | #endif /* _CLOUD_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.