[ODE] ODE internals: row-major or column-major?
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Wed Oct 4 15:53:55 MST 2006
There's also the question of row vectors vs column vectors.
Mauro G. Todeschini wrote:
> 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
> [a3]=m14 -
> [a4]=m21 -
> [a5]=m22 Second Row
> [a7]=m24 -
> [a8]=m31 -
> [a9]=m32 Third Row
> [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:
> Anybody can clarify? Is ODE row or column major?
> There is something I really cannot catch...
> Thanks and Bye
> ODE mailing list
> ODE at q12.org
More information about the ODE