Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h @ 7768

Last change on this file since 7768 was 7768, checked in by amaechler, 18 years ago

branches/atmospheric_engine: cloud hacking

File size: 955 bytes
Line 
1/**
2* @file cloud_effect.h
3*/
4
5#ifndef _CLOUD_EFFECT
6#define _CLOUD_EFFECT
7
8#include "vector.h"
9#include "vector2D.h"
10
11#include "weather_effect.h"
12
13#include "sound_buffer.h"
14#include "sound_source.h"
15
16class CloudEffect : public WeatherEffect
17{
18        public:
19                CloudEffect(const TiXmlElement* root = NULL);
20                virtual ~CloudEffect();
21
22                virtual void loadParams(const TiXmlElement* root);
23
24                virtual bool init();
25
26                virtual bool activate();
27                virtual bool deactivate();
28
29                virtual void draw() const;
30                virtual void tick(float dt);
31
32        private:
33                // Basic noise map 32x32
34                float map32[32 * 32];
35
36                // The cloud map
37                float map256[256 * 256];
38
39                char texture[256][256][3];       //Temporary array to hold texture RGB values
40
41                float noise(int x, int y, int random);
42                void setNoise(float  *map);
43                float interpolate(float x, float y, float  *map);
44                void overlapOctaves(float  *map32, float  *map256);
45                void expFilter(float  *map);
46};
47
48#endif  /* _CLOUD_EFFECT */
Note: See TracBrowser for help on using the repository browser.