View Full Version : camera position

09-14-2000, 01:30 PM
First, I know that the camera (as if there is one) is always at 0,0,0 and that we move the objects in a scene, but

after a series of translate rotates etc how can I get my camera's exact position wrt the world

09-14-2000, 07:02 PM
I'm new so this might sound crazy. but if you mean that your modelview matrix and your projection matrix need to be equal to each other you can say

float yourMatrix[16];
glGetFloatv(GL_MODELVIEW_MATRIX, yourMatrix);

I think this is what you are talking about, it might not even work though http://www.opengl.org/discussion_boards/ubb/frown.gif. Hope it helps.

09-14-2000, 07:03 PM
wait a second, thats nonsense. nevermind, don't listen to me!

09-15-2000, 05:13 AM
Get the modelview matrix, invert it, and throw (0,0,0,1) at it.
Matrix inversion routines are to be found in these forums (forae?). Search for my name.

09-15-2000, 09:20 AM
(straying from the subject by a mile)i think forum is neuter gender so if i remeber my latin from high school correctly the plural is "fora".

09-15-2000, 09:22 AM
as if ya'll care. http://www.opengl.org/discussion_boards/ubb/rolleyes.gif