[ODE] ODE internals: row-major or column-major?

Mauro G. Todeschini mauro2006todeschini at itia.cnr.it
Wed Oct 4 07:38:33 MST 2006


Hi,
	I'm looking at ode code and I have some question that I haven't been
able to solve googling. So I need your help :)
I've read that ode stores matrixes in memory in row-major style (which
is opposite to OpenGL column major style). I've also read that row-major
means that if I have a (rotation) matrix like this (3 rows, 4 columns):
[m11 m12 m13 m14]
[m21 m22 m23 m24]
[m31 m32 m33 m34]
... It get stored in an array like this:
[a0]=m11 -
[a1]=m12 First row
[a2]=m13
[a3]=m14 -
[a4]=m21 -
[a5]=m22 Second Row
[a6]=m23
[a7]=m24 -
[a8]=m31  -
[a9]=m32  Third Row
[a10]=m33
[a11]=m34 -
Ok, It seemed clear but... =:-o
I looked at the code of the function dRFromEulerAngles (file
rotation.cpp) and to me It seems that the rotation matrix get stored in
column-major style.
The rotation matrix of the composition of a X rotation followed by a Y
rotation followed by a Z rotation in fact shold have the form shown at
the end of this page:
http://planning.cs.uiuc.edu/node102.html
Anybody can clarify? Is ODE row or column major?
There is something I really cannot catch...

Thanks and Bye



More information about the ODE mailing list