[Bf-committers] OT: 3D-Math Question
remo.pini at avexys.com
Thu May 7 19:04:50 CEST 2009
I know this might be the wrong place to ask, but with so many brilliant
heads in one spot, I just have to try...
I have an object A and an object B
For each of these objects, I have a translation/location T
(3D-Vector/Vertex), a rotation R (Quaternion) and a Scale S (Float).
Object A: Ta, Ra, Sa
Object B: Tb, Rb, Sb
My problem is the following: Object B's T & R are relative to Object A
and I need to transform them into absolute T & R so that I can calculate
the actual position of each vertex.
I tried some (I thought) obvious things like:
Tb' = (Tb-Ta)*Ra+Ta
Rb' = Ra*Rb
Then for each Vertex Vb of B:
Vb' = (Vb*Sb)*Rb + Tb
However, this seems to be wrong, if I start to rotate Object A around,
the position of Object B relative to Object A changes (which it
What am I doing wrong here?
More information about the Bf-committers