示例#1
0
        void Translate2(ref Matrix m, Matrix transformation)
        {
            Vector3 t = TMOMat.DecomposeMatrix(ref transformation);

            m.M41 = t.X + m.M41;
            m.M42 = t.Y + m.M42;
            m.M43 = t.Z + m.M43;
        }
示例#2
0
        public void Transform(TPONode node)
        {
            for (int i = 0; i < tmo.frames.Length; i++)
            {
                TMOMat mat = tmo.GetTMOMat(node.name, i);

                Matrix  m       = mat.m;
                Vector3 scaling = Vector3.Empty;
                Vector3 t       = TMOMat.DecomposeMatrix(ref m, out scaling);

                scaling.X *= (float)Math.Pow(node.Scaling.X, ratio);
                scaling.Y *= (float)Math.Pow(node.Scaling.Y, ratio);
                scaling.Z *= (float)Math.Pow(node.Scaling.Z, ratio);
                m         *= node.RotationMatrix(m, ratio);
                t         += node.Translation * ratio;

                mat.m = Matrix.Scaling(scaling) * m * Matrix.Translation(t);
            }
        }
示例#3
0
        void Transform2(ref Matrix m, Matrix transformation)
        {
            Vector3 t = TMOMat.DecomposeMatrix(ref transformation);

            m = transformation * m;
        }