memecs

08-17-2009, 02:14 PM

hello everyone, i got a problem with rotation matrices multiplication and i hope someone could help me tofigure that out...

So say that i want to perform a sequence of rotation in order xyz. Since opengl pre-multiplied it means that it's multiplying in this way:

Rz * Rx * Ry

now i've implemented the matrix Rz * Ry * Rx on my own and it looks exactly like the xyz matrix in the Matrix Table at the bottom of this link:

http://en.wikipedia.org/wiki/Euler_angles

comparing the two rotations i figured out that this matrix perform the following opengl sequence of rotation:

glRotated(az,0,0,1)

glRotated(ay,0,1,0)

glRotated(ax,1,0,0)

How is this possible? Where am I wrong?

thanks a lot

So say that i want to perform a sequence of rotation in order xyz. Since opengl pre-multiplied it means that it's multiplying in this way:

Rz * Rx * Ry

now i've implemented the matrix Rz * Ry * Rx on my own and it looks exactly like the xyz matrix in the Matrix Table at the bottom of this link:

http://en.wikipedia.org/wiki/Euler_angles

comparing the two rotations i figured out that this matrix perform the following opengl sequence of rotation:

glRotated(az,0,0,1)

glRotated(ay,0,1,0)

glRotated(ax,1,0,0)

How is this possible? Where am I wrong?

thanks a lot