]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/precipitation_mgr.cxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Environment / precipitation_mgr.cxx
index 1be206dc4089bddecd657e947bc1b4d3d9d27d89..e4ca0c0f638723d3bb367cd1b0d532d6fcdda3b5 100644 (file)
 #include <osg/MatrixTransform>
 
 #include <simgear/constants.h>
-#include <simgear/math/SGMath.hxx>
 #include <simgear/scene/sky/sky.hxx>
 #include <simgear/scene/sky/cloud.hxx>
+#include <simgear/scene/util/OsgMath.hxx>
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
-#include <Main/renderer.hxx>
+#include <Viewer/renderer.hxx>
 #include <Scenery/scenery.hxx>
 
 #include "precipitation_mgr.hxx"
@@ -81,7 +81,7 @@ void FGPrecipitationMgr::init()
     SGGeod geod = SGGeod::fromDegM(fgGetDouble("/position/longitude-deg", 0.0),
                                    fgGetDouble("/position/latitude-deg", 0.0),
                                    0.0);
-    osg::Matrix position(geod.makeZUpFrame());
+    osg::Matrix position(makeZUpFrame(geod));
     // Move the precipitation object to player position
     transform->setMatrix(position);
     // Add to scene graph
@@ -130,7 +130,6 @@ float FGPrecipitationMgr::getPrecipitationAtAltitudeMax(void)
 {
     int i;
     int max;
-       double elev;
     float result;
     SGPropertyNode *boundaryNode, *boundaryEntry;
 
@@ -180,7 +179,7 @@ float FGPrecipitationMgr::getPrecipitationAtAltitudeMax(void)
 
         // For each boundary layers
         while ( ( boundaryEntry = boundaryNode->getNode( "entry", i ) ) != NULL ) {
-            elev = boundaryEntry->getDoubleValue( "elevation-ft" );
+            double elev = boundaryEntry->getDoubleValue( "elevation-ft" );
 
             if (elev > result)
                 result = elev;