Last change
on this file since 8181 was
8175,
checked in by amaechler, 19 years ago
|
branches/atmospheric_engine: new cloud implementation using shaders, not yet working - wanna fix it? look at source and the demo mentioned there
|
File size:
1.2 KB
|
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 | virtual void draw() const; |
---|
36 | virtual void tick(float dt); |
---|
37 | |
---|
38 | // void setRadius(float radius); |
---|
39 | // void setTexture(char* fileName); |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | void initialize(char* fileName); |
---|
44 | |
---|
45 | // GLUquadricObj* sphereObj; // A Placeholder for the Sphere. |
---|
46 | Material* cloudMaterial; // A Material for the Sphere. |
---|
47 | float sphereRadius; // Radius of the Sphere. |
---|
48 | |
---|
49 | float mover; |
---|
50 | float cloudSpeed; |
---|
51 | std::string cloudTexture; |
---|
52 | |
---|
53 | inline void setCloudTexture(const std::string& file) { this->cloudTexture = file; } |
---|
54 | inline void setCloudAnimation(float speed) { this->cloudSpeed = speed; } |
---|
55 | |
---|
56 | Sglmodel_sgl g_sky_model; |
---|
57 | Shader* skyShader; |
---|
58 | |
---|
59 | float g_tint[4]; |
---|
60 | float g_scroll; |
---|
61 | |
---|
62 | float time; |
---|
63 | |
---|
64 | |
---|
65 | }; |
---|
66 | |
---|
67 | #endif /* _CLOUD_EFFECT */ |
---|
Note: See
TracBrowser
for help on using the repository browser.