[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 
vector, convention.

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 
"real" 3x4.

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? 
Please? :-)

Cheers,

          / h+


Salik Syed wrote:
> I couldn't find this in the docs...
> but if I have a matrix
> ABC
> DEF
> GHI
>
> does dBodyGetRotation return
> ABCDEFGHI
>
> or ADGBEHCFI?
>
> Thanks
>
> <http://www.saliksyed.com>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode
>
>
>   


More information about the ODE mailing list