-
Getting back the transformation matrix
How can I get OpenGL to read the current transformation matrix into some int m[][] so that it's individual rows and columns are available to me?
Plz email me as well as posting a response.
Thanks, Jordan
-
Re: Getting back the transformation matrix
You can use:
GLdouble ProjectionMatrix[16],ModelViewMatrix[16];
glGetDoublev(GL_PROJECTION_MATRIX,ProjectionMatrix );
glGetDoublev(GL_MODELVIEW_MATRIX,ModelViewMatrix);
Then, the indices 0-15 corresponds to the following in the matrix:
[0 4 8 12]
[1 5 9 13]
[2 6 10 14]
[3 7 11 15]
Regards.
Eric
-
Re: Getting back the transformation matrix
THANK YOU!!!
You just saved me about 40 points on my midterm ;-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules