X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmath%2FSGGeod.cxx;h=15468707dc4034ef7ad9ca959511aaf4438e7ba9;hb=6a7c2000027cd22eea603e936ddbad1a5bfc8b04;hp=01e857a215a7406cfca9698246db886a89c6acfc;hpb=600726976c2513cac582538bf4cb8e4a569e4010;p=simgear.git diff --git a/simgear/math/SGGeod.cxx b/simgear/math/SGGeod.cxx index 01e857a2..15468707 100644 --- a/simgear/math/SGGeod.cxx +++ b/simgear/math/SGGeod.cxx @@ -17,22 +17,24 @@ #include "SGMath.hxx" -osg::Matrix SGGeod::makeSimulationFrameRelative() +#ifndef NO_OPENSCENEGRAPH_INTERFACE + +osg::Matrix SGGeod::makeSimulationFrameRelative() const { SGQuatd hlOr = SGQuatd::fromLonLat(*this); - return osg::Matrix(hlOr.osg()); + return osg::Matrix(toOsg(hlOr)); } -osg::Matrix SGGeod::makeSimulationFrame() +osg::Matrix SGGeod::makeSimulationFrame() const { osg::Matrix result(makeSimulationFrameRelative()); SGVec3d coord; SGGeodesy::SGGeodToCart(*this, coord); - result.setTrans(coord.osg()); + result.setTrans(toOsg(coord)); return result; } -osg::Matrix SGGeod::makeZUpFrameRelative() +osg::Matrix SGGeod::makeZUpFrameRelative() const { osg::Matrix result(makeSimulationFrameRelative()); // 180 degree rotation around Y axis @@ -41,11 +43,13 @@ osg::Matrix SGGeod::makeZUpFrameRelative() return result; } -osg::Matrix SGGeod::makeZUpFrame() +osg::Matrix SGGeod::makeZUpFrame() const { osg::Matrix result(makeZUpFrameRelative()); SGVec3d coord; SGGeodesy::SGGeodToCart(*this, coord); - result.setTrans(coord.osg()); + result.setTrans(toOsg(coord)); return result; } + +#endif