Inverting the Camera Transform The solution is on p. 25 of Robot Manipulators: Mathematics, Programming, and Control by Richard Paul (old reliable) What we need to do is represent the camera frame in in eye space, the space within which OpenGL rendering is done. Given C - the camera transformation in world space we need C' it's inverse. We needn't do a full blown matrix inverse because of the special case of this frame. it has an orthonormal upper 3x3 and a translation vector. C' can be calculated thusly:
C = nx ox ax px ny oy ay py nz oz az pz C' nx ox ax
= ny nz -p.n oy oz -p.o ay az -p.a
Plug C' into the transformation OpenGL transformation pipeline