Jump to content
  • Advertisement
Sign in to follow this  
Marty666

Matrices

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all... I'm kinda noob doing matrix algebra, so i'm going to ask some stupid questions. I've had the theory at university some time ago, but with OpenGL it seems to be different. Is it true that: 1) Opengl uses this format with the first 3 columns being the axes defining space and the 4th column is just a vector for the origin of this matrix compared to the world? 0 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 2) When i multiply this matrix by another or calculate the inverse or transpose i'll only need to use the 3x3 matrix 0,1,2,4,5,6,8,9,10? 3) Finally, what are 3, 7, 11 and 15 used for? Thanx, Marty

Share this post


Link to post
Share on other sites
Advertisement
Quote:
1) Opengl uses this format with the first 3 columns being the axes defining space and the 4th column is just a vector for the origin of this matrix compared to the world?

0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15
That's correct, assuming the matrix is a 'forward' (local-to-parent) transform rather than an inverse (parent-to-local) transform.
Quote:
2) When i multiply this matrix by another or calculate the inverse or transpose i'll only need to use the 3x3 matrix 0,1,2,4,5,6,8,9,10?
Not sure what you mean by this. Some operations will only be concerned with the upper 3x3 portion, but in general you have to take the translation portion into account as well.
Quote:
3) Finally, what are 3, 7, 11 and 15 used for?
For most transformations (such as rotation, scaling, and translation) they will always be set to [0 0 0 1], and basically have no effect. They do come into play for other operations, such as projection.

Share this post


Link to post
Share on other sites
Ok, I kinda get the idear of these matrices now, but the articles are very confusing, because some have the axes in the rows instead of columns. And I still don't really understand the 4th W dimention in the vectors.
Is there an article about 3D transformations using matrices and matrix algebra, like multiplications, addition, transposing, inverting that is compatible with the opengl matrices?

Thank you,
Marty

Share this post


Link to post
Share on other sites
The fourth coordinate is best understood in the context of projective space. In the language of Projective Geometry, the matrices whose last row is (0 0 0 1) are special in that they map the plane at infinity onto itself. Not the easiest thing to understand, but it all makes sense in a beautiful construction.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!