obtain or construct homogenuous transform matrix for each object
lets call them a,b
corresponding to meshes A,B
compute the difference matrix d
for example you want to go from A
to B
then its just matter of solving:
a*d = b
Inverse(a)*a*d = Inverse(a)*b
d = Inverse(a)*b
Beware in case you use different notations (like reverse order of multiplication and or inverse matrices instead of direct ones the equation might get inverted and or transposed)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…