|
It follows a very simple and basic rule:
ChildGlobal = ParentGlobal * ChildLocal
So ChildLocal = ParentGlobal.Inverse() * ChildGlobal.
If the node do not have a parent, which means it is already the top one in the hierarchy,
then its Global == Local.
For Translation specifically:
ChildLocalTranslation = ParentGlobal.Inverse() * ChildGlobalTranslation
Notice: ParentGlobal is the whole transform matrix, not just the translation.
Take a look at the following post should also be helpful:
http://hilscreate.blogspot.com/2009/03/space-global-object-local.html
Author: Jiayang Xu
|