2 * @file precipitation_mgr.hxx
3 * @author Nicolas VIVIEN
6 * @note Copyright (C) 2008 Nicolas VIVIEN
8 * @brief Precipitation manager
9 * This manager calculate the intensity of precipitation in function of the altitude,
10 * calculate the wind direction and velocity, then update the drawing of precipitation.
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #ifndef _PRECIPITATION_MGR_HXX
30 #define _PRECIPITATION_MGR_HXX
32 #include <simgear/structure/subsystem_mgr.hxx>
33 #include <simgear/environment/precipitation.hxx>
36 class FGPrecipitationMgr : public SGSubsystem
39 osg::ref_ptr<osg::Group> group;
40 osg::ref_ptr<osg::MatrixTransform> transform;
41 osg::ref_ptr<SGPrecipitation> precipitation;
42 float getPrecipitationAtAltitudeMax(void);
46 virtual ~FGPrecipitationMgr();
48 // SGSubsystem methods
50 virtual void update (double dt);
52 void setPrecipitationLevel(double l);
54 osg::Group * getObject(void);