View Full Version : Urgent:Modelview-Matrix!!
Can someone please give me a little ascii drawing of the Modelview-Matrix or something like that.I get it with glGetFloatv(....),but to do further calcs with it IŽll have to know how it looks like.I think it must consist of a vector in x-,in z- and in the viewing Direction,but in which order??
Thanks in advance,XBCT!
04-20-2000, 12:24 PM
This is all I know about the model view matrix:
1 ? ? ?
? 1 ? ?
? ? 1 ?
x y z 1
x,y,z, gives you the absoloute coordinates of the current position in the modelview matrix.
It's a while since I looked at this so I'm not sure it's correct. I think at the back of the red book there's some more info about it...
Hope it helps (and hope that I'm not completely wrong...) http://www.opengl.org/discussion_boards/ubb/smile.gif
04-20-2000, 12:28 PM
Although I'm not positive how OpenGL does it I am sure that it works the way every graphics textbook teaches it. The way it is done is with transform, rotation, scaling, and other matrixs. What basically happens is you just keep multiping these various matrixs together and matrix math makes it work out. If you need to know how this works get a book on graphics theory and read the chapers on this cause it is much more than I can type out.
So in answer to your question no position is the matrix just holds the x, y, or z translations or the viewing direction. It is all combined. The matrix is a 4x4 matrix though and to make any changes just make a the matrix you want and muliply it to the Modelview matrix to get the desired results (but be warned this making a matrix to muliply the modelview matrix requires quite a bit of knowlegde about matrix math.)
Hope this gets you pointed in the right direction.
to better clarify:
mv=uvx_x; mv=uvy_x; mv=uvz_x; mv=xlt_x;
mv=uvx_y; mv=uvy_y; mv=uvz_y; mv=xlt_y;
mv=uvx_z; mv=uvy_z; mv=uvz_z; mv=xlt_z;
mv=0; mv=0; mv=0; mv=1;
uvx,uvy,uvz unit vectors for rotoscaling
xlt translation vector
[This message has been edited by dmy (edited 04-21-2000).]
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.