[ODE] why setTransform() ?

Ruud van Gaal ruud at marketgraph.nl
Wed Jan 9 03:50:02 2002


> > ODE's matrices have 3 rows, not 4. also, ODE matrices may contain
> > doubles whereas OpenGL matrices contain singles. so some kind of
> > setTransform() function is needed.
> 
> yes, but you're also transposing the rotation part of the 
> matrix. Again:
> 
> 0 4 8  12  		 0 1 2  12
> 1 5 9  13	into 	 4 5 6  13
> 2 6 10 14		 8 9 10 14
> 3 7 11 15		 3 7 11 15

This is because of a (designed) quirk in OpenGL, when it transitioned from
IrisGL into OpenGL.
The OpenGL matrix in the man pages is different from how it's stored. So if
you didn't know OpenGL, used C/C++, and created a 4x4 matrix, you'd store it
transposed to how OpenGL wants it.
So what looks like a transpose really isn't a transpose, but a conversion to
OpenGL's memory format.

Ruud