]> git.mxchange.org Git - flightgear.git/commitdiff
Adapt to simgear SGMath change.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Sat, 3 Mar 2012 12:37:43 +0000 (13:37 +0100)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Sat, 3 Mar 2012 12:37:43 +0000 (13:37 +0100)
Simgears SGMath has lost its dependency on osg.
Update includes and code using these methods.

src/ATC/trafficcontrol.cxx
src/Airports/groundnetwork.cxx
src/Environment/precipitation_mgr.cxx
src/Instrumentation/gps.cxx
src/Navaids/positioned.hxx
utils/fgviewer/fgviewer.cxx

index 8e29f04d05af3b889a5ae9cf5909c24347bc31bd..fb15674cdc92eb2a9d4b3faaf89abfe20427a7d8 100644 (file)
@@ -1298,7 +1298,7 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat,
                             double lon, double elev, double hdg, double slope)
 {
     SGGeod geod = SGGeod::fromDegM(lon, lat, elev);
-    obj_pos = geod.makeZUpFrame();
+    obj_pos = makeZUpFrame(geod);
     // hdg is not a compass heading, but a counter-clockwise rotation
     // around the Z axis
     obj_pos.preMult(osg::Matrix::rotate(hdg * SGD_DEGREES_TO_RADIANS,
index 8e9b16fe6fbbd9090ede8eb4a400bb9f46cb9ce8..3727fc601e09601d389a52611c3cb964c8c463c2 100644 (file)
@@ -1327,7 +1327,7 @@ static void WorldCoordinate(osg::Matrix& obj_pos, double lat,
                             double lon, double elev, double hdg, double slope)
 {
     SGGeod geod = SGGeod::fromDegM(lon, lat, elev);
-    obj_pos = geod.makeZUpFrame();
+    obj_pos = makeZUpFrame(geod);
     // hdg is not a compass heading, but a counter-clockwise rotation
     // around the Z axis
     obj_pos.preMult(osg::Matrix::rotate(hdg * SGD_DEGREES_TO_RADIANS,
index 1be206dc4089bddecd657e947bc1b4d3d9d27d89..a3e91514dfaf41971a16a7ebf7851cf5794a8554 100644 (file)
@@ -33,9 +33,9 @@
 #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>
@@ -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
index 667ff2c36b50daf7e9f63a773cab5da52d96e2ef..5076b53807479a48c2453923f25330b1007cfa5e 100644 (file)
@@ -29,6 +29,7 @@
 #include <simgear/sg_inlines.h>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/scene/util/OsgMath.hxx>
 
 using std::auto_ptr;
 using std::string;
index de5a31322ac2940ae32ae07da23961573a753fc7..6d77d34208bfa2c4d9f0b6fa63f6608fb690e533 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef FG_POSITIONED_HXX
 #define FG_POSITIONED_HXX
 
+#include <string>
 #include <vector>
 
 #include <simgear/structure/SGSharedPtr.hxx>
index a120d4d72eb454d723df59d05a2a3ac69013cdc4..515b41f2e506fa4cb5c52b5d8c9e2a885646c63b 100644 (file)
@@ -41,6 +41,7 @@
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/scene/material/EffectCullVisitor.hxx>
 #include <simgear/scene/material/matlib.hxx>
+#include <simgear/scene/util/OsgMath.hxx>
 #include <simgear/scene/util/SGReaderWriterOptions.hxx>
 #include <simgear/scene/tgdb/userdata.hxx>
 #include <simgear/scene/tgdb/TileEntry.hxx>