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.
29 #ifndef _PRECIPITATION_HXX
30 #define _PRECIPITATION_HXX
32 #include <osgDB/ReadFile>
33 #include <osgDB/FileUtils>
34 #include <osgUtil/Optimizer>
35 #include <osgUtil/CullVisitor>
36 #include <osgViewer/Viewer>
39 #include <osg/Stencil>
40 #include <osg/ClipPlane>
41 #include <osg/ClipNode>
42 #include <osg/MatrixTransform>
43 #include <osgUtil/TransformCallback>
44 #include <osgParticle/PrecipitationEffect>
47 class SGPrecipitation {
51 float _snow_intensity;
52 float _rain_intensity;
58 osg::ref_ptr<osgParticle::PrecipitationEffect> precipitationEffect;
63 osg::Group* build(void);
66 void setWindProperty(double, double);
67 void setFreezing(bool);
68 void setRainIntensity(float);
69 void setSnowIntensity(float);