To main page
Right, Up, Back vectors From Modelview matrix
The modelview matrix
actually contains 4 vectors:
In this text m[i]
is i-th element of modelview matrix as returned by glGetFloat call.
ight vector" is ( m, m, m ).
p vector" is ( m, m, m ).
ack vector" is ( m, m, m ).
is a mnemonic to easily remember order in which vectors are stored in modelview matrix.
Length of each of those vectors equals 1.0 always and the angle between any of them is 90 degrees - they are unit vector and the 3x3 matrix formed by R-U-B-vectors is called rotation matrix
The "encoded" camera center is m,m,m. The "encoded" part is due to the fact that this is NOT world coordinates, but the coordinates in terms of "right-up-back vectors", (it's the position of world origin in this camera's coordinate frame), so to find the real position you have to do some calculations: -R*t, where R is [0 4 8; 1 5 9; 2 6 10] matrix and t is [12 13 14] column vector.
See Center of viewport
's "3D coordinates of current camera center in PyOpenGL" section to find out how to "decode" it.
This article is a stub, it contains information that doesn't explain subject fully.