MODELVIEW matrix

Started by
0 comments, last by masonium 22 years, 5 months ago
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?
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
Dirk =[Scarab]= Gerrits

This topic is closed to new replies.

Advertisement