PDA

View Full Version : Modelviewmatrix

aiscape
01-27-2003, 03:37 AM
Hi!
Can anyone tell me something about the structure of the modelviewmatrix?

If mvm = [4x4] what are the contents of values m0 to m15?

Thanks, Aiscape.

knackered
01-27-2003, 04:07 AM
It defines a coordinate system, by which all vertices and normals are transformed:-

X axis : mvm[00] mvm[01] mvm[02] mvm[03]
Y axis : mvm[04] mvm[05] mvm[06] mvm[07]
Z axis : mvm[08] mvm[09] mvm[10] mvm[11]
translation: mvm[12] mvm[13] mvm[14] mvm[15]

aiscape
01-27-2003, 07:35 AM
Hello!
Thank you for your answer, but I need it more exact. Do you know, where I can find information (maybe by reference to a coordsystem-image including all angles)?
Thanks a lot.

SirKnight
01-27-2003, 07:37 AM
Have you tried looking at the "redbook?"

-SirKnight

pkaler
01-27-2003, 11:03 AM
You probably want to read this: http://research.microsoft.com/~hollasch/cgindex/math/matrix/column-vec.html

V-man
01-27-2003, 06:01 PM
X axis : mvm[00] mvm[01] mvm[02] mvm[03]
Y axis : mvm[04] mvm[05] mvm[06] mvm[07]
Z axis : mvm[08] mvm[09] mvm[10] mvm[11]
translation: mvm[12] mvm[13] mvm[14] mvm[15]
[/B]<HR></blockquote>

rotational information (as I call it) is stored in the upper left 3 x 3 matrix.
Translation information (as I call it) is stored in the rightmost column vector4
The bottom row vector4 is commonly 0 0 0 1
where 1 is the w of the "translation information"

There is more that can be said, but I like keeping my posts short http://www.opengl.org/discussion_boards/ubb/smile.gif

PS: transpose the matrix knack has posted

[This message has been edited by V-man (edited 01-27-2003).]

knackered
01-28-2003, 01:19 AM
Don't transpose it. vman is just following his own preferred column/row major order. The array element numbers I have shown are correct.

dorbie
01-28-2003, 01:33 AM