[ODE] Inverse transforming a vector

Gary R. Van Sickle g.r.vansickle at worldnet.att.net
Mon Apr 15 20:03:01 2002


> Hi,
>
> Given a transform and a vector, is there a routine that will compute the
> transform^-1 * vector without actually computing the inverse of the
> transform?
>

Not in ODE AFAIK, but what you want to do can certainly be done without doing a
matrix inversion.  The way I know how to do it (and there's probably an easier
way, I'm just too damn lazy to think it through) takes two easy steps:

1.  Subtract the "position vector" (column 3 rows 0,1,2 in ODE IIRC) of the
transform matrix from the vector.
2.  Multiply the vector by the transpose of the 3x3 rotation matrix.

The reason this works is due to the very useful fact that the transpose of a
rotation matrix is the same as its inverse.

--
Gary R. Van Sickle
Brewer.  Patriot.