2 * @file precipitation.hxx
3 * @author Nicolas VIVIEN
6 * @note Copyright (C) 2008 Nicolas VIVIEN
8 * @brief Precipitation effects to draw rain and snow.
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.
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.
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.
27 #ifndef _PRECIPITATION_HXX
28 #define _PRECIPITATION_HXX
31 #include <osg/Referenced>
32 #include <osgParticle/PrecipitationEffect>
35 class SGPrecipitation : public osg::Referenced
40 bool _droplet_external;
42 float _snow_intensity;
43 float _rain_intensity;
45 float _rain_droplet_size;
46 float _snow_flake_size;
51 osg::ref_ptr<osgParticle::PrecipitationEffect> _precipitationEffect;
55 virtual ~SGPrecipitation() {}
56 osg::Group* build(void);
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);
69 void setEnabled( bool );
70 bool getEnabled() const;