Пример #1
0
        public static IMatrix3 GetWorldMatrixComplete(this IINode node, int t, bool parent)
        {
            var tm = node.GetObjTMAfterWSM(t, Forever);
            var ptm = node.ParentNode.GetObjTMAfterWSM(t, Forever);

            if (!parent)
                return tm;

            if (node.ParentNode.SuperClassID == SClass_ID.Camera)
            {
                var r = ptm.GetRow(3);
                ptm.IdentityMatrix();
                ptm.SetRow(3, r);
            }

            ptm.Invert();
            return tm.Multiply(ptm);
        }