Changeset 8079 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
- Timestamp:
- Jun 1, 2006, 4:15:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
r8052 r8079 6 6 #define _CLOUD_EFFECT 7 7 8 #include "vector.h"9 #include "vector2D.h"10 11 8 #include "weather_effect.h" 12 9 … … 14 11 #include "sound_source.h" 15 12 13 #include "world_entity.h" 14 #include "glincl.h" 15 16 16 class Material; 17 17 class Vector; 18 18 19 19 class CloudEffect : public WeatherEffect … … 33 33 virtual void tick(float dt); 34 34 35 inline void setCloudAnimation(float timestep) { this->cloudAnimTimeStep = timestep; } 35 void setRadius(float radius); 36 void setTexture(char* fileName); 37 36 38 37 39 private: 38 // Basic noise maps 32x32 39 float cloudMap32_a[32 * 32]; 40 float cloudMap32_b[32 * 32]; 41 float cloudMap32_c[32 * 32]; 40 void initialize(char* fileName); 42 41 43 // The cloud map 256x256 44 float cloudMap256[256 * 256]; 42 GLUquadricObj* sphereObj; // A Placeholder for the SkySphere. 43 Material* cloudMaterial; // A Material for the SkySphere. 44 float sphereRadius; // Radius of the SkySphere. 45 float mover; 46 float cloudSpeed; 47 std::string cloudTexture; 45 48 46 // Temporary array to hold texture RGB values 47 char cloudTexture[256][256][3]; 48 49 GLuint texID[2]; 50 float timer; 51 52 bool cloudAnimTimeStep; 53 54 float noise(int x, int y, int random); 55 float interpolate(float x, float y, float *map); 56 void overlapOctaves(); 57 void expFilter(); 58 59 void genNoiseMap(float *map); 60 void genCloudTexture(); 61 void calcAnimMap(float timer); 62 Material* material; 49 inline void setCloudTexture(const std::string& file) { this->cloudTexture = file; } 50 inline void setCloudAnimation(float speed) { this->cloudSpeed = speed; } 63 51 64 52 };
Note: See TracChangeset
for help on using the changeset viewer.