From c71c9aee0a321192d01f89f161cbdbd6112491b6 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sat, 3 Mar 2012 13:37:43 +0100 Subject: [PATCH] Adapt to simgear SGMath change. Simgears SGMath has lost its dependency on osg. Update includes and code using these methods. --- src/ATC/trafficcontrol.cxx | 2 +- src/Airports/groundnetwork.cxx | 2 +- src/Environment/precipitation_mgr.cxx | 4 ++-- src/Instrumentation/gps.cxx | 1 + src/Navaids/positioned.hxx | 1 + utils/fgviewer/fgviewer.cxx | 1 + 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index 8e29f04d0..fb15674cd 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -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, diff --git a/src/Airports/groundnetwork.cxx b/src/Airports/groundnetwork.cxx index 8e9b16fe6..3727fc601 100644 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@ -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, diff --git a/src/Environment/precipitation_mgr.cxx b/src/Environment/precipitation_mgr.cxx index 1be206dc4..a3e91514d 100644 --- a/src/Environment/precipitation_mgr.cxx +++ b/src/Environment/precipitation_mgr.cxx @@ -33,9 +33,9 @@ #include #include -#include #include #include +#include #include
#include
@@ -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 diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 667ff2c36..5076b5380 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -29,6 +29,7 @@ #include #include #include +#include using std::auto_ptr; using std::string; diff --git a/src/Navaids/positioned.hxx b/src/Navaids/positioned.hxx index de5a31322..6d77d3420 100644 --- a/src/Navaids/positioned.hxx +++ b/src/Navaids/positioned.hxx @@ -21,6 +21,7 @@ #ifndef FG_POSITIONED_HXX #define FG_POSITIONED_HXX +#include #include #include diff --git a/utils/fgviewer/fgviewer.cxx b/utils/fgviewer/fgviewer.cxx index a120d4d72..515b41f2e 100644 --- a/utils/fgviewer/fgviewer.cxx +++ b/utils/fgviewer/fgviewer.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include -- 2.39.5