]> git.mxchange.org Git - simgear.git/blob - simgear/environment/visual_enviro.hxx
Harald Johnson:
[simgear.git] / simgear / environment / visual_enviro.hxx
1 // Visual environment helper class
2 //
3 // Written by Harald JOHNSEN, started April 2005.
4 //
5 // Copyright (C) 2005  Harald JOHNSEN - hjohnsen@evc.net
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
20 //
21 //
22 #ifndef _VISUAL_ENVIRO_HXX
23 #define _VISUAL_ENVIRO_HXX
24
25 class SGEnviro {
26
27 private:
28         bool view_in_cloud;
29         bool precipitation_enable_state;
30         float precipitation_density;
31
32 public:
33         SGEnviro();
34         ~SGEnviro();
35
36         void startOfFrame(void);
37         void endOfFrame(void);
38
39         // this can be queried to add some turbulence for example
40         bool is_view_in_cloud(void) const;
41         void set_view_in_cloud(bool incloud);
42
43         // Clouds
44         // return the size of the memory pool used by texture impostors
45         int get_clouds_CacheSize(void) const;
46         int get_CacheResolution(void) const;
47         float get_clouds_visibility(void) const;
48         float get_clouds_density(void) const;
49         bool get_clouds_enable_state(void) const;
50
51         void set_clouds_CacheSize(int sizeKb);
52         void set_CacheResolution(int resolutionPixels);
53         void set_clouds_visibility(float distance);
54         void set_clouds_density(float density);
55         void set_clouds_enable_state(bool enable);
56
57         // rain/snow
58         float get_precipitation_density(void) const;
59         bool get_precipitation_enable_state(void) const;
60
61         void set_precipitation_density(float density);
62         void set_precipitation_enable_state(bool enable);
63
64         // others
65         bool get_lightning_enable_state(void) const;
66         void set_lightning_enable_state(bool enable);
67 };
68
69 extern SGEnviro sgEnviro;
70
71 #endif // _VISUAL_ENVIRO_HXX