3d rotation

Post: #1
I have a 3d rotation question. First, lets say you have an openGL view that looks straight down a the z axis when untransform - the normal setup. (Not an ortho view, a normal perspective.) Now, lets say the model matrix undergoes a series of rotation only transforms. Using the getfloat() method you can get the transformed model matrix. Now (here is the actual question, fianlly) how do you determine what vectors in the tranformed coordinate system are equal to the x, y or z vectors in the untransformed coordinate system? Do you do multiply say x (1,0,0) by the inverse (or the transpose) of the transform matrix? Can you get openGL to give you the inverse of the model matrix?

[edit] I gues there is no reason to expect openGl be able to give the inverse, seeing as it is not a math library.
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
No, you have to invert the matrix yourself.

gluUnproject does it...
Quote this message in a reply
Posts: 469
Joined: 2002.10
Post: #3
well if you want to do it the hard way, you could always do the change of bases yourself with a little linear algebra.

15.4" MacBook Pro revA
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Quaternion rotation -> OpenGL rotation matrix? DJBlufire 3 5,681 Sep 6, 2003 08:34 PM
Last Post: MattDiamond