Sorry in advance if this is a really basic Matrix/OpenGl question. I have a situation where I have a 4×4 matrix that I would like to translate to, but don’t want to use glMultMatrixf. I would rather use a gluLookAt method I’ve been using for most other translations. Is getting the values needed from the 4×4 matrix as simple as just pulling out the proper column values? If so which columns map to which parameters?
The signature of gluLookAt:
void gluLookAt( GLdouble eyeX,
GLdouble eyeY,
GLdouble eyeZ,
GLdouble centerX,
GLdouble centerY,
GLdouble centerZ,
GLdouble upX,
GLdouble upY,
GLdouble upZ )
http://pyopengl.sourceforge.net/documentation/ref/glu/lookat.html
http://www.opengl.org/wiki/GluLookAt_code
The parameters don’t exist in the matrix, per se. The matrix is calculated from them. It’s produced by multiplying the three vertexes (eye, center, and “up”) into the current view matrix.
The OpenGL Red Book (which you really should get, if you don’t have it already) explains it in more detail.