]> git.mxchange.org Git - simgear.git/blob - simgear/environment/precipitation.hxx
Merge branch 'next' of git.mxchange.org:/var/cache/git/repos/simgear into next
[simgear.git] / simgear / environment / precipitation.hxx
1 /**
2  * @file precipitation.hxx
3  * @author Nicolas VIVIEN
4  * @date 2008-02-10
5  *
6  * @note Copyright (C) 2008 Nicolas VIVIEN
7  *
8  * @brief Precipitation effects to draw rain and snow.
9  *
10  * @par Licences
11  *   This program is free software; you can redistribute it and/or
12  *   modify it under the terms of the GNU General Public License as
13  *   published by the Free Software Foundation; either version 2 of the
14  *   License, or (at your option) any later version.
15  *
16  *   This program is distributed in the hope that it will be useful, but
17  *   WITHOUT ANY WARRANTY; without even the implied warranty of
18  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  *   General Public License for more details.
20  *
21  *   You should have received a copy of the GNU General Public License
22  *   along with this program; if not, write to the Free Software
23  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24  *
25  */
26
27 #ifndef _PRECIPITATION_HXX
28 #define _PRECIPITATION_HXX
29
30 #include <osg/Group>
31 #include <osg/Referenced>
32 #include <osgParticle/PrecipitationEffect>
33
34
35 class SGPrecipitation : public osg::Referenced
36 {
37 private:
38     bool _freeze;
39     bool _enabled;
40     bool _droplet_external;
41
42     float _snow_intensity;
43     float _rain_intensity;
44     float _clip_distance;
45     float _rain_droplet_size;
46     float _snow_flake_size;
47     float _illumination;
48         
49     osg::Vec3 _wind_vec;
50         
51     osg::ref_ptr<osgParticle::PrecipitationEffect> _precipitationEffect;
52
53 public:
54     SGPrecipitation();
55     virtual ~SGPrecipitation() {}
56     osg::Group* build(void);
57     bool update(void);
58         
59     void setWindProperty(double, double);
60     void setFreezing(bool);
61     void setDropletExternal(bool);
62     void setRainIntensity(float);
63     void setSnowIntensity(float);
64     void setRainDropletSize(float);
65     void setSnowFlakeSize(float);
66     void setIllumination(float);
67     void setClipDistance(float);
68
69     void setEnabled( bool );
70     bool getEnabled() const;
71 };
72
73 #endif