View Full Version : possible useful feature
06-23-2003, 08:50 AM
Hello, i think that will be very good that Ogl2 uses quaternions instead the classic rotation matrix, or to have quaternions as an alternative native rotate method. If all programmers must do their own quaternion matrix, i think that it will be an advantage.
P.D: sorry for my bad english ;P
[This message has been edited by Ffelagund (edited 06-23-2003).]
06-23-2003, 01:29 PM
You can already use glRotate in GL 1.0 to do that:
float theta = RAD_2_DEG(2 * acos(q->w));
if (q->w < 1.0f && q->w > -1.0f)
glRotatef(theta, q->x, q->y, q->z);
06-24-2003, 02:16 AM
Yes yes, i known how to use quaternions, but imagine that glRotate* internaly uses quaterions. You could use glRotate* without the risk of gimbal lock. I think that are more effective (and easy) use glRotateWithImplicitQuaternions, than make our own cuaternion class and apply it.
P.D sorry by my bad english i should practice more.
[This message has been edited by Ffelagund (edited 06-24-2003).]
Gimbal lock is only an issue when using Euler angles. glRotate uses an axis/angle, so glRotate itself doesn't suffer from the Gimbal lock problem any more than quaternions does.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.