From 37eae8c7195f3374c7f3f2f462372a9a0aaa6a69 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 14 Mar 2019 10:13:15 +0000 Subject: [PATCH] Removed the optional code path hack --- src/osgPlugins/p3d/ReaderWriterP3D.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/osgPlugins/p3d/ReaderWriterP3D.cpp b/src/osgPlugins/p3d/ReaderWriterP3D.cpp index 211e6c801..1311b548b 100644 --- a/src/osgPlugins/p3d/ReaderWriterP3D.cpp +++ b/src/osgPlugins/p3d/ReaderWriterP3D.cpp @@ -217,14 +217,10 @@ public: qlhs.makeRotate(osg::DegreesToRadians(lhs[0]),lhs[1],lhs[2],lhs[3]); qrhs.makeRotate(osg::DegreesToRadians(rhs[0]),rhs[1],rhs[2],rhs[3]); osg::Quat quat = qlhs*qrhs; - #ifdef OSG_USE_FLOAT_QUAT - osg::Vec4f result; - #else - osg::Vec4d result; - #endif - quat.getRotate ( result[0], result[1], result[2], result[3]); - result[0] = osg::RadiansToDegrees(result[0]); - return result; + osg::Quat::value_type angle; + osg::Vec3 direction; + quat.getRotate(angle, direction); + return osg::Vec4(osg::RadiansToDegrees(angle), direction.x(), direction.y(), direction.z()); } inline bool read(const char* str, int& value) const;