What do modelview / projection /texture matrices Contains?
Hi all,
I SEARCHED GOOGLE!
i didn''t find nothing useful, maybe too because i don''t know exactly what to put in the search string,
i realized that the modelview contains
Sx__??__??__??
??__Sy__??__??
??__??__Sz__??
Px__Py__Pz__??
where S is Scale (modified with glScalef)
P is position (modified with gltranslate)
but what does other data contains?
thanks
There aren''''t problems that can''''t be solved with a gun...
Rotations, but I can''t remember exactly where. Try a few and see how they affect it.
-solo (my site)
-solo (my site)
I would think of it as decomposing each matrix into a
top-left 3x3, a bottom 1x3, a right 3x1 and the number 1
in the bottom right:
I like to think of it as : Proj=Position you eye,
MV = position your data w.r.t. your eye. Make changes
to your eye (eg, zooming in using a "sight") in the Proj matrix, Move your models around using the model view.
top-left 3x3, a bottom 1x3, a right 3x1 and the number 1
in the bottom right:
M = [ R | 0 ] [-------] [ T | 1 ]T = translationR = rotation (may contain scale, if your models areappear at diffent scales)0 = zero vector. Put non-zero values here only if you are after strange effects.P = [ R | P ] [-------] [ T | 1 ]R : The rotation in the projection matrix is usuallysimple and "axis aligned". ie, it allows you to thinkof your camera looking down/up the X/Y or Z axis.T : is a translation - but it can be static dependingyou your app. ie, You can use it to "position the eye at 1.0,looking down the Z axis" - you then manupulate the model viewto move things in this logical space.P: Perspective vector - Ususally this would only have a z component, calculated to give a certain FoV.
I like to think of it as : Proj=Position you eye,
MV = position your data w.r.t. your eye. Make changes
to your eye (eg, zooming in using a "sight") in the Proj matrix, Move your models around using the model view.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement