• Advertisement

Archived

This topic is now archived and is closed to further replies.

MODELVIEW matrix

This topic is 5920 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

In some rendering APIs there is a world (or model) matrix and a viewing matrix. In OpenGL, howeverm there is a modelview matrix. I know this is a result of some sort of concatenation, but how is this made? If the two matrices are multiplied, is it MODEL * VIEW or VIEW * MODEL?

Share this post


Link to post
Share on other sites
Advertisement
Well in OpenGL you would first do a glLoadMatrix(view) and then a glMultMatrix(model).
Whether this is view * model or model * view depends on how you interpret the 16 float's that OpenGL uses for a matrix.
If you think of 0,1,2,3 as the first COLUMN of a matrix, then the procedure above is equivalent to: view * model. If you think of 0,1,2,3 as the first ROW of a matrix, then it would be model * view.
Why? Well (A * B)T = BT * AT, or in English: the transpose of a matrix multiplication is the multiplication of the transposed matrices in reverse order.

Does that make any sense?

EDIT: typo

Edited by - Scarab0 on November 7, 2001 10:41:55 AM

Share this post


Link to post
Share on other sites

  • Advertisement