Page 1 of 1

Matrix

Posted: Thu Feb 19, 2004 2:09 am
by ttom
Hi dear folk:
I read the so book about the opengl or direct3d , they just talk about the
matrix. I found something strange.
Below is the matirx

Transformations

some book write this some book write this
| 1 0 0 0 | | 1 0 0 tx |
| 0 1 0 0 | | 0 1 0 ty |
| 0 0 0 1 | | 0 0 1 tz |
| tx ty tz 1 | | 0 0 0 1 |


My question is what different between they?
ps. sorry for my poor english.

Posted: Thu Feb 19, 2004 3:04 am
by BradB
One is the transpose of the other. I am not 100% sure, but I believe that OpenGL and directX use opposite conventions for row/column order.
I think the left matrix is OpenGL's style, and the right DX style.

You can move between the two by using rows as columns and columns as rows.

Brad

Posted: Thu Feb 19, 2004 2:28 pm
by [dx/x]=HUNT3R
yeah that's right... for some reason a matrix representation in OpenGL is symmetric to the standard representation in DirectX and mathematics. So in DirectX (standard) Mij = OpenGL Mji. If you have the OpenGL Programming Guide (the red book) read page 106.

Posted: Thu Feb 19, 2004 2:37 pm
by [dx/x]=HUNT3R
I almost forgot, you are wrong about the order. The left matrix that ttom wrote is the standard matrix form that DirectX also uses. The right matrix is the transpose of the the standard which OpenGL uses.

Posted: Tue Feb 24, 2004 10:26 pm
by James
And don't forget that every math textbook that cares about its reputation uses the right matrix format :)

Posted: Tue Feb 24, 2004 11:00 pm
by [dx/x]=HUNT3R
Really? One of my degrees is in mathematics and I've never used the matrix form on the right in school or in any of my textbooks. That's why I was calling the matrix on the left "standard".

Posted: Tue Feb 24, 2004 11:15 pm
by Robomaniac
He was most likely meaning the "correct" one, but idk