PDA

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



mattjakob
11-06-2009, 04: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


Where:
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, 08:32 AM
Don't cross-post! << Thread collapse >> (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=266699)