3 rotations in ONE ?

3 rotations in ONE ?

Post by Mirko Carlini mat.14 » Sat, 26 Sep 1998 04:00:00



Hi,
I'm programming with OpenGL,
is there a way to make 3 rotations with 1 glRotate ?
Each rotation is about one axis (x, y, z).
Example:
    glRotatef(degree1, 1.0, 0.0, 0.0)
    glRotatef(degree2, 0.0, 1.0, 0.0)
    glRotatef(degree3, 0.0, 0.0, 1.0)

    I need to obtain the effect of these 3 instructions
    with just one glRotate. Is it possible ?
Thanks.

 
 
 

3 rotations in ONE ?

Post by Manuel Alduci » Sun, 27 Sep 1998 04:00:00


Maybe one solution could be making the rotations using quaternions. They're
described in the Watt & Watt book, "Adnaced Animation and Rendering
Techniques".


: Hi,
: I'm programming with OpenGL,
: is there a way to make 3 rotations with 1 glRotate ?
: Each rotation is about one axis (x, y, z).
: Example:
:     glRotatef(degree1, 1.0, 0.0, 0.0)
:     glRotatef(degree2, 0.0, 1.0, 0.0)
:     glRotatef(degree3, 0.0, 0.0, 1.0)
:     I need to obtain the effect of these 3 instructions
:     with just one glRotate. Is it possible ?
: Thanks.

-------------------------------------------------------------------
Manuel Alducin

Computer Graphics and Multimedia
The George Washington University
-------------------------------------------------------------------