Page 1 of 1

Quaterion bug

Posted: Sat Apr 30, 2005 8:21 pm
by iso
Hi! I thing I misunderstood something by the quaetrnions, because the results I get look incorrect.

I've got a Quaterion rot = {0.93924177,0,0.34325632,0}.
The orientation, it repersents is just a little yaw.
The zAxis of this quaternion is {0.64480138,0,0.76435018}.

When I now call Radian angle = rot.getYaw(), it returns 0 radians!

I suppose, getYaw should return a non-zero value, but it doesn't.

Posted: Sat Apr 30, 2005 8:27 pm
by haffax
There was an issue with the getYaw/Roll/Pitch methods in the Quaternion class. It has been fixed yesterday or early today in the v1-0 branch in the CVS.

Posted: Sat Apr 30, 2005 8:31 pm
by iso
Thanks, I assume, it suffices to download only the OgreQuaterion.h + cpp.

Just one more question. When I have an "old" quternion and a rotation taht I want to apply to it, is it rotation*old, or old*rotation?

Posted: Sat Apr 30, 2005 9:03 pm
by iso
tanis wrote:There was an issue with the getYaw/Roll/Pitch methods in the Quaternion class. It has been fixed yesterday or early today in the v1-0 branch in the CVS.
I downloaded the latest OgreQuaterion and recompiled OgreMain, but it doesn't seem to have solved the problem. Still 0.0 radians as result.

Are you sure, it's been fixed the right way?

[edit]
I've tested it with rot.ToAngleAxis(angle2,dir);
and as result came: dir = {0,1,0} and angle2 > 0 !

So I think, the bug is not completely removed yet.
[/edit]

Posted: Sun May 01, 2005 5:07 pm
by sinbad
Tested it here and it works fine. Perhaps anon CVS isn't up to date yet.