Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: possible useful feature

  1. #1
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    269

    possible useful feature

    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).]
    "I don't know... with a casual fly"

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jun 2003
    Posts
    181

    Re: possible useful feature

    You can already use glRotate in GL 1.0 to do that:

    Code :
    QUAT q;
    float theta = RAD_2_DEG(2 * acos(q->w));
    if (q->w < 1.0f &amp;&amp; q->w > -1.0f) 
        glRotatef(theta, q->x, q->y, q->z);

  3. #3
    Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Spain
    Posts
    269

    Re: possible useful feature

    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).]
    &quot;I don't know... with a casual fly&quot;

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: possible useful feature

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •