Greenjacket
09-10-2006 09:40:25
I've just been looking through the Ogre and OgreDotNet Quaternion slerp code, and looking at the case where the sign on the second quaternion is negated. My understanding is that either you negate the sign of the second quaternion, or alternatively negate the sign of its coefficient: in this implementation, that would be something like:
rather than the current
Would my understanding be right (or am I talking out my a**e!!)
If I'm right, this also affects the Ogre implementation also. I have also posted on the Ogre forums about this.
I've also noted a possible problem with the OgreDotNet implementation of the quaternion method ToAngleAxis (where Sqrt is used instead of the correct InvSqrt): I think the line
should be
or
Any comments?
Thanks
Greenjacket
coeff1 = - coeff1;rather than the current
coeff0 = - coeff0;Would my understanding be right (or am I talking out my a**e!!)
I've also noted a possible problem with the OgreDotNet implementation of the quaternion method ToAngleAxis (where Sqrt is used instead of the correct InvSqrt): I think the line
float invLength = -(float)Math.Sqrt(sqrLength);should be
float invLength = -1.0f / (float)Math.Sqrt(sqrLength);or
float invLength = -(float)Math.InvSqrt(sqrLength);Any comments?
Thanks
Greenjacket