View Full Version : Just wanting confirmation of my information

09-29-2005, 05:56 AM
Hello everyone. The title says what I am looking for. I am just wanting confirmation on my understanding of the information that I have on the camera matrix. If any of my understanding is wrong I would greatly appreciate any corrections.

x1 y1 z1 w1
x2 y2 z2 w2
x3 y3 z3 w3
x4 y4 z4 w4

Ok, now this is how I understand the above camera matrix.

w1 w2 w3 w4 = camera translation in world space

x1 y1 z1 w1 = X axis orientation of the camera
(strafe? vector)

x2 y2 z2 w2 = Y axis orientation of the camera (or up vector)

x3 y3 z3 w3 = Z axis orientation of the camera
(or view/look at vector)

x1 y2 z3 = scale vector

x1 y1 z1
x2 y2 z2 = rotation matrix of camera
x3 y3 z3

I seen reference to the negative Z axis being the view but not sure what that means exactly. Any hints? Is my understanding correct? I tried searching these forums but never found any definitive information on what parts of the matrix are for what.
Thank you.

Ehsan Kamrani
09-29-2005, 06:46 AM
What do you mean from the camera matrix? In OpenGL, there's no camera. Camera is just a projection from the 3D space to the 2D space. In OpenGL, camera does not move. When you do a translation, rotation, or scaling, you transform the modelview matrix. When you write the following code, you say that i want to use or transform the modelview matrix:
glMatrixMode( GL_MODELVIEW );
As an example, when you do a translation, you multiply the translation matrix to the current modelview matrix.There's no camera matrix in OpenGL.

09-29-2005, 07:30 AM
I am not sure then how to explain what I am talking about. Camera matrix is the only term I have been told. I will think on it and continue my research, hopefully I can give a "better" explanation.