WIKI Update Request RE: [ODE] Jitters and GeomTransforms

Jon Watte hplus-ode at mindcontrol.org
Mon Feb 7 09:29:50 MST 2005


> However, the documentation seems a little light on the issue of how
> ODE creates their 4x3 rotation matricies. Does anyone know if it is in
> column order, or row order? I typically just use 3x3 (Leaving out
> entires, 3, 7 and 11) rotation matricies, and I think it's that
> section of code that was wrong.

Not only is there a question of column or row major, but there's also 
a question of pre-multiply vs post-multiply convention.

The ODE Wiki actually has documentation on the ODE matrix layout, and 
gives functions for converting between ODE and DirectX matrices.



You can also run the following experiment:

  float q[4];
  float R[12];
  dQFromAxisAndAngle( q, 0, 1, 0, 3.1416/2 );
  dRfromQ( R, q );

This shows that the matrix after rotating around Y for quarter turn is:

address    value
  0-3      0  0  1  [0]
  4-7      0  1  0  [0]
 8-11      -1 0  0  [0]

Remember that this should take X to -Z, so the lower-left -1 must be 
multiplied by "X" from an input vector, so input vectors 
This assumes row major storage, and post-multiplied column vectors. If 
you believe your layout is column major, then it assumes pre-multiplied 
row vectors. This means that the un-used fourth elements could contain 
a translation, if you wanted to use them for that.


I can't seem to actually edit the Wiki, so please stick this into the 
FAQ section, something about matrix lay-out. 

Cheers,

			/ h+




More information about the ODE mailing list