]> git.mxchange.org Git - flightgear.git/blob - src/Environment/precipitation_mgr.hxx
Merge branch 'jmt/gps'
[flightgear.git] / src / Environment / precipitation_mgr.hxx
1 /**
2  * @file precipitation_mgr.hxx
3  * @author Nicolas VIVIEN
4  * @date 2008-02-10
5  *
6  * @note Copyright (C) 2008 Nicolas VIVIEN
7  *
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.
11  *
12  * @par Licences
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.
17  *
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.
22  *
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.
26  *
27  */
28
29 #ifndef _PRECIPITATION_MGR_HXX
30 #define _PRECIPITATION_MGR_HXX
31
32 #include <simgear/structure/subsystem_mgr.hxx>
33 #include <simgear/environment/precipitation.hxx>
34
35
36 class FGPrecipitationMgr : public SGSubsystem
37 {
38 private:
39     osg::ref_ptr<osg::Group> group;
40     osg::ref_ptr<osg::MatrixTransform> transform;
41     osg::ref_ptr<SGPrecipitation> precipitation;
42     float getPrecipitationAtAltitudeMax(void);
43
44 public:
45     FGPrecipitationMgr();
46     virtual ~FGPrecipitationMgr();
47
48     // SGSubsystem methods
49     virtual void init ();
50     virtual void update (double dt);
51     
52     void setPrecipitationLevel(double l);
53
54     osg::Group * getObject(void);
55
56 };
57
58 #endif
59