[ODE] Are the rotation matrices returned by dBodyGetRotation Column or row major
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Mon Oct 29 21:59:35 MST 2007
That depends on whether you consider yourself row vector, or column
The matrix is actually a 3x4 matrix, with the fourth values being
undefined. Those four values live at offset 3, 7 and 11 when indexed as
an array, and would contain the translation values if the matrix was a
If you consider yourself column vector on the right, it will return
ABCxDEFyGHIz, which is row major, which is the reverse of what you'd use
in OpenGL (which is also column vector on the right).
If you consider yourself row vector on the left, it will return
ADGxBEHyCFIz, which is column major, which is the reverse of what you'd
use in DirectX (which is also row vector on the left).
I don't know how many times I've explained this on this list -- can
someone who knows how to update the documentation please copy & paste
the question and explanation to the introductory chapter of the docs?
Salik Syed wrote:
> I couldn't find this in the docs...
> but if I have a matrix
> does dBodyGetRotation return
> or ADGBEHCFI?
> ODE mailing list
> ODE at ode.org
More information about the ODE