Re: quat to euler

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Thu, 06 May 1999 11:58:46 -0700


h.d. pfeffer wrote:
>
> Hi all
>
> I'm trying to calculate the euler angles of a quaternion x y z a.
>
> pfQuat quat.set(x,y,z,a);
> pfMatrix mat.makeQuat(quat);
> mat.getOrthoCoord(&coord);
>
> 1. I suppose there is a better way to get the euler angles
> 2. the result of coord.hpr is not the one I expected
>
> Any suggestions ?

Perhaps you have some axes mixed up in the quaternion. Remember that in
the Performer vector representation +z is up, +y is forward and +x is
starboard.

This means that roll is about y, pitch is about x and heading is about
z.

You might want to check out this site I spotted on opengl.org today:

http://www.xs4all.nl/~stolk/hq/

I haven't read it in detail. Remember that in OpenGL +y is up and -z is
forward.

Cheers,Angus.

-- 
"Microsoft's system was like a forest that hadn't had a controlled
 burn in decades, just waiting for one person with a match to turn
 it into a disaster. Melissa was Microsoft's fault. They left their
 system wide open to this sort of abuse, they knew it could happen
 and did nothing." -- Bruce Perens

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu May 06 1999 - 11:58:51 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.