blood.angel

01-31-2002, 06:01 PM

Sorry about this but I cant find anything to answer my question in a search.

Right. I've read the FAQs on quaternions and want to know how to implement them in OpenGL. Im trying to do a rubixs cube and am trying to bypass the problem of gimbal lock. The rotation angles are stored as eulers floats.

Have I got this right for converting euler angles into quaternions into a rotation matrix:

1. Get Euler angles.

2. Convert the three angles into a single quaternion.

3. Convert the quaternion to a rotational matrix.

4. glMultMatrix the rotational matrix when drawing object.

[This message has been edited by blood.angel (edited 01-31-2002).]

Right. I've read the FAQs on quaternions and want to know how to implement them in OpenGL. Im trying to do a rubixs cube and am trying to bypass the problem of gimbal lock. The rotation angles are stored as eulers floats.

Have I got this right for converting euler angles into quaternions into a rotation matrix:

1. Get Euler angles.

2. Convert the three angles into a single quaternion.

3. Convert the quaternion to a rotational matrix.

4. glMultMatrix the rotational matrix when drawing object.

[This message has been edited by blood.angel (edited 01-31-2002).]