From fb214b62a18269f58b59a5e2bdad9c5ce7e75272 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sun, 20 Aug 2017 15:56:40 +0000 Subject: [PATCH] Use osg::Quat::value_type instead of double in collada plugin Note that although the value_type is currently always double, using the proper typedef will open the door to implementing a float Quaternion in the future (as I have done so in my own fork) --- src/osgPlugins/dae/daeWTransforms.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/dae/daeWTransforms.cpp b/src/osgPlugins/dae/daeWTransforms.cpp index 79d408c4e..a51d9b608 100644 --- a/src/osgPlugins/dae/daeWTransforms.cpp +++ b/src/osgPlugins/dae/daeWTransforms.cpp @@ -39,7 +39,7 @@ void daeWriter::writeUpdateTransformElements(const osg::Vec3 &pos, const osg::Qu // Make a three rotate place elements for the euler angles // TODO decompose quaternion into three euler angles - double angle; + osg::Quat::value_type angle; osg::Vec3 axis; q.getRotate( angle, axis ); @@ -154,7 +154,7 @@ void daeWriter::apply( osg::PositionAttitudeTransform &node ) scale->getValue().append3( s.x(), s.y(), s.z() ); } - double angle; + osg::Quat::value_type angle; osg::Vec3 axis; q.getRotate( angle, axis ); if ( angle != 0 )