Re: Are the rotation matrices returned by dBodyGetRotation Column or row major

"Jon Watte (ODE)" <[email protected]> Mon, 29 Oct 2007 21:59:35 -0700
Newsgroups gmane.comp.lib.ode
Message-ID <[email protected]>
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
> [email protected]
> http://ode.org/mailman/listinfo/ode
>
>
>