## [Ogre-cvsmail] SF.net SVN: ogre:[8740] branches/v1-6/OgreMain/src/OgreQuaternion.cpp

 [Ogre-cvsmail] SF.net SVN: ogre:[8740] branches/v1-6/OgreMain/src/OgreQuaternion.cpp From: - 2009-06-21 17:04:00 ```Revision: 8740 http://ogre.svn.sourceforge.net/ogre/?rev=8740&view=rev Author: sinbad Date: 2009-06-21 17:03:48 +0000 (Sun, 21 Jun 2009) Log Message: ----------- Revert rev 8715 - our Quaternion FromRotationMatrix is actually better! Revision Links: -------------- http://ogre.svn.sourceforge.net/ogre/?rev=8715&view=rev Modified Paths: -------------- branches/v1-6/OgreMain/src/OgreQuaternion.cpp Modified: branches/v1-6/OgreMain/src/OgreQuaternion.cpp =================================================================== --- branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-20 21:00:49 UTC (rev 8739) +++ branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-21 17:03:48 UTC (rev 8740) @@ -59,13 +59,13 @@ // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes // article "Quaternion Calculus and Fast Animation". - Real fTrace = 1.0 + kRot[0][0]+kRot[1][1]+kRot[2][2]; + Real fTrace = kRot[0][0]+kRot[1][1]+kRot[2][2]; Real fRoot; - if ( fTrace > 1e-4 ) + if ( fTrace > 0.0 ) { // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math::Sqrt(fTrace); // 2w + fRoot = Math::Sqrt(fTrace + 1.0); // 2w w = 0.5*fRoot; fRoot = 0.5/fRoot; // 1/(4w) x = (kRot[2][1]-kRot[1][2])*fRoot; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```

 [Ogre-cvsmail] SF.net SVN: ogre:[8715] branches/v1-6/OgreMain/src/OgreQuaternion.cpp From: - 2009-06-17 17:40:38 ```Revision: 8715 http://ogre.svn.sourceforge.net/ogre/?rev=8715&view=rev Author: sinbad Date: 2009-06-17 17:39:57 +0000 (Wed, 17 Jun 2009) Log Message: ----------- Fix overzealous checking code in Quaternion::FromRotationMatrix. Modified Paths: -------------- branches/v1-6/OgreMain/src/OgreQuaternion.cpp Modified: branches/v1-6/OgreMain/src/OgreQuaternion.cpp =================================================================== --- branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-17 17:04:50 UTC (rev 8714) +++ branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-17 17:39:57 UTC (rev 8715) @@ -59,13 +59,13 @@ // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes // article "Quaternion Calculus and Fast Animation". - Real fTrace = kRot[0][0]+kRot[1][1]+kRot[2][2]; + Real fTrace = 1.0 + kRot[0][0]+kRot[1][1]+kRot[2][2]; Real fRoot; - if ( fTrace > 0.0 ) + if ( fTrace > 1e-4 ) { // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math::Sqrt(fTrace + 1.0); // 2w + fRoot = Math::Sqrt(fTrace); // 2w w = 0.5*fRoot; fRoot = 0.5/fRoot; // 1/(4w) x = (kRot[2][1]-kRot[1][2])*fRoot; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```
 [Ogre-cvsmail] SF.net SVN: ogre:[8740] branches/v1-6/OgreMain/src/OgreQuaternion.cpp From: - 2009-06-21 17:04:00 ```Revision: 8740 http://ogre.svn.sourceforge.net/ogre/?rev=8740&view=rev Author: sinbad Date: 2009-06-21 17:03:48 +0000 (Sun, 21 Jun 2009) Log Message: ----------- Revert rev 8715 - our Quaternion FromRotationMatrix is actually better! Revision Links: -------------- http://ogre.svn.sourceforge.net/ogre/?rev=8715&view=rev Modified Paths: -------------- branches/v1-6/OgreMain/src/OgreQuaternion.cpp Modified: branches/v1-6/OgreMain/src/OgreQuaternion.cpp =================================================================== --- branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-20 21:00:49 UTC (rev 8739) +++ branches/v1-6/OgreMain/src/OgreQuaternion.cpp 2009-06-21 17:03:48 UTC (rev 8740) @@ -59,13 +59,13 @@ // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes // article "Quaternion Calculus and Fast Animation". - Real fTrace = 1.0 + kRot[0][0]+kRot[1][1]+kRot[2][2]; + Real fTrace = kRot[0][0]+kRot[1][1]+kRot[2][2]; Real fRoot; - if ( fTrace > 1e-4 ) + if ( fTrace > 0.0 ) { // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math::Sqrt(fTrace); // 2w + fRoot = Math::Sqrt(fTrace + 1.0); // 2w w = 0.5*fRoot; fRoot = 0.5/fRoot; // 1/(4w) x = (kRot[2][1]-kRot[1][2])*fRoot; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```