Which Matrixformat does Irrlicht use

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Which Matrixformat does Irrlicht use

Post by r2d2 »

This Document OpenGL
| 0 1 2 3 | | 0 4 8 12 |
| | | |
| 4 5 6 7 | | 1 5 9 13 |
M = | | M = | |
| 8 9 10 11 | | 2 6 10 14 |
| | | |
| 12 13 14 15 | | 3 7 11 15 |


Does irrlicht use the standard or the opengl notation?
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

DirectX format
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

how is the direct X Matrix format aligned? like the opengl or like the standard?
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

from the matrix4 source:

Code: Select all

//! 4x4 matrix. Mostly used as transformation matrix for 3d calculations.
/* Matrix4 is mainly used by the Irrlicht engine for doing transformations.
The matrix is a D3D style matrix, row major with translations in the 4th row.
*/
then:

http://www.google.ch/search?sourceid=na ... +row+major

then take the first link:
http://www.gamedev.net/community/forums ... id=198818

and there you are :)

OpenGL uses column-major order DirectX uses row-major order.
But, Irrlicht does the translation for you. All you have to do is deal with Irrlicht Matrix4 which happens to be also row major order. (many math books definie a matrix to be column major order ...)
Btw. to convert you only have to build the transposed matrix.
Post Reply