[ODE] Inverse transforming a vector

Adam Moravanszky amoravanszky at dplanet.ch
Mon Apr 15 08:54:02 2002


> And while I'm at it, are there functions that treat the combination of
> position and rotation as a single transformation?  Or do you always need
> to transform in two steps?  Two steps isn't a big deal, I just want to
> get into the proper habit from the start.

The homogenous transformation matrix

[R0 R1 R2 T0]
[R3 R4 R5 T1]
[R6 R7 R8 T2]
[0   0    0     1  ]

when multiplied with the vector

[V0]
[V1]
[V2]
[  1 ]

produces the same values in the result's first three elements as:

R*V + T

as you can easily verify.  The last row of the matrix isn't actually
neccesary for this particular operation either.

--
-- Adam Moravanszky
http://n.ethz.ch/student/adammo/