Debian Codegraph @

src/Environment/precipitation_mgr.hxx

raw symbols SCIP
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 #include <simgear/props/tiedpropertylist.hxx>
35
36 class FGPrecipitationMgr : public SGSubsystem
37 {
38 private:
39 osg::ref_ptr<osg::MatrixTransform> transform;
40 osg::ref_ptr<SGPrecipitation> precipitation;
41 float getPrecipitationAtAltitudeMax(void);
42 simgear::TiedPropertyList _tiedProperties;
43
44 public:
45 FGPrecipitationMgr();
46 virtual ~FGPrecipitationMgr();
47
48 // Subsystem API.
49 void bind() override;
50 void init() override;
51 void unbind() override;
52 void update(double dt) override;
53
54 // Subsystem identification.
55 static const char* staticSubsystemClassId() { return "precipitation"; }
56
57 void setupSceneGraph(void);
58 void setPrecipitationLevel(double l);
59 };
60
61 #endif