PDA

View Full Version : Rotation



fobru
07-31-2003, 05:53 AM
Can anybody give me formulas for rotating the same way as opengl does by code :

glRotatef xAngle, 0.5, 0, 0
glRotatef yAngle, 0, 0.5, 0
glRotatef zAngle, 0, 0, 0.5

It's something like translating the rotationmatrixes of opengl as in the red book in source code...

starman
07-31-2003, 07:04 AM
What are you looking for? The source code for glRotatef? I don't understand your question.

nexusone
07-31-2003, 07:29 AM
Do a google search on 3D matrix math, there a few sites the go over how to do matrix math and rotations in matrix math.



Originally posted by fobru:
Can anybody give me formulas for rotating the same way as opengl does by code :

glRotatef xAngle, 0.5, 0, 0
glRotatef yAngle, 0, 0.5, 0
glRotatef zAngle, 0, 0, 0.5

It's something like translating the rotationmatrixes of opengl as in the red book in source code...