]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/precipitation_mgr.hxx
#918: fix jsbsim in-air repositioning issue
[flightgear.git] / src / Environment / precipitation_mgr.hxx
index 2d2457976bff202b7cbc6d362fe3ed5dd22f0a79..449f7f47c332a60bdc6c6a63e75d854c8550da08 100644 (file)
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
- * @par CVS
- *   $Id$
  */
 
 #ifndef _PRECIPITATION_MGR_HXX
 #define _PRECIPITATION_MGR_HXX
 
+#include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/environment/precipitation.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
 
-#include "precipitation_mgr.hxx"
+class FGPrecipitationMgr : public SGSubsystem
+{
+private:
+    osg::ref_ptr<osg::Group> group;
+    osg::ref_ptr<osg::MatrixTransform> transform;
+    osg::ref_ptr<SGPrecipitation> precipitation;
+    float getPrecipitationAtAltitudeMax(void);
+    simgear::TiedPropertyList _tiedProperties;
 
+public:
+    FGPrecipitationMgr();
+    virtual ~FGPrecipitationMgr();
 
-class FGPrecipitationMgr {
-private:
-       osg::Group *group;
-       osg::MatrixTransform *transform;
-       SGPrecipitation *precipitation;
-       float getPrecipitationAtAltitudeMax(void);
+    // SGSubsystem methods
+    virtual void bind ();
+    virtual void unbind ();
+    virtual void init ();
+    virtual void update (double dt);
+    
+    void setPrecipitationLevel(double l);
 
+    osg::Group * getObject(void);
 
-public:
-       FGPrecipitationMgr();
-       ~FGPrecipitationMgr();
-       bool update(void);
-       osg::Group * getObject(void);
 };
 
 #endif