Jump to content

  • Log In with Google      Sign In   
  • Create Account

MODELVIEW matrix


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 masonium   Members   -  Reputation: 118

Like
Likes
Like

Posted 06 November 2001 - 04:47 PM

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?

Sponsor:

#2 Scarab0   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 November 2001 - 07:22 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS