View Full Version : Change of representation: eye in object space

11-06-2009, 03:52 AM
I know it's very dumb but I cant get around this.
I need to calculate the position of the camera (eye) in object space, given a transformation matrix M.

I think in theory is should be:

eye_obj = col * (V.transpose).inverse * M.inverse

col = {0,0,0,1}
V = 4x4 camera transform matrix retrieved via glGetFloatv(GL_MODELVIEW_MATRIX, V)
M = 4x4 transform matrix defining the center of the object

But clearly this is not working...

Dark Photon
11-06-2009, 07:32 AM
Don't cross-post! << Thread collapse >> (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=266699)