FlightGear next
precipitation_mgr.hxx
Go to the documentation of this file.
1
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
36class FGPrecipitationMgr : public SGSubsystem
37{
38private:
39 osg::ref_ptr<osg::MatrixTransform> transform;
40 osg::ref_ptr<SGPrecipitation> precipitation;
41 float getPrecipitationAtAltitudeMax(void);
42 simgear::TiedPropertyList _tiedProperties;
43
44public:
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
virtual ~FGPrecipitationMgr()
FGPrecipitaiton Manager destructor.
void init() override
SGSubsystem initialization.
void setPrecipitationLevel(double l)
FGPrecipitationMgr()
FGPrecipitation Manager constructor.
static const char * staticSubsystemClassId()
void update(double dt) override
Update the precipitation drawing.