public static Transform3 Inverse(Transform3 m)
        {
            Matrix3 rotInv = Matrix3.Inverse(m.GetUpper3x3());
            Vector3 trans  = new Vector3(
                -m[3][0] * rotInv[0][0] - m[3][1] * rotInv[1][0] - m[3][2] * rotInv[2][0],
                -m[3][0] * rotInv[0][1] - m[3][1] * rotInv[1][1] - m[3][2] * rotInv[2][1],
                -m[3][0] * rotInv[0][2] - m[3][1] * rotInv[1][2] - m[3][2] * rotInv[2][2]);

            return(new Transform3(rotInv[0], rotInv[1], rotInv[2], trans));
        }
 public static void Decompose(Transform3 t,
                              out float scaleX, out float scaleY, out float scaleZ,
                              out float shearXY, out float shearXZ, out float shearZY,
                              out float rotateX, out float rotateY, out float rotateZ,
                              out float transX, out float transY, out float transZ)
 {
     Matrix3.Decompose(t.GetUpper3x3(),
                       out scaleX, out scaleY, out scaleZ,
                       out shearXY, out shearXZ, out shearZY,
                       out rotateX, out rotateY, out rotateZ);
     transX = t[3][0];
     transY = t[3][1];
     transZ = t[3][2];
 }