Example #1
0
 /// <summary>
 /// XNAMatrixToMatrix4 converts a XNA Matrix object holding Joint Orientation to a Kinect Matrix4.
 /// Matrix is initialized to zeros, and the joint orientation only holds a 3x3 rotation matrix.
 /// </summary>
 /// <param name="mat">An XNA Matrix object to be converted to a Kinect Matrix4.</param>
 /// <returns>Returns a Kinect Matrix4.</returns>
 public static Microsoft.Kinect.Matrix4 XNAMatrixToMatrix4(Matrix mat)
 {
     Microsoft.Kinect.Matrix4 converted = new Microsoft.Kinect.Matrix4();
     converted.M11 = mat.M11;
     converted.M12 = mat.M12;
     converted.M13 = mat.M13;
     converted.M21 = mat.M21;
     converted.M22 = mat.M22;
     converted.M23 = mat.M23;
     converted.M31 = mat.M31;
     converted.M32 = mat.M32;
     converted.M33 = mat.M33;
     converted.M44 = mat.M44;
     return(converted);
 }
Example #2
0
        /// <summary>
        /// Matrix4ToXNAMatrix converts a Matrix4 object holding Joint Orientation to an XNA Matrix.
        /// Matrix is initialized to zeros, and the joint orientation only holds a 3x3 rotation matrix.
        /// </summary>
        /// <param name="mat">A Matrix4 object to be converted to an XNA Matrix.</param>
        /// <returns>Returns an XNA Matrix.</returns>
        public static Matrix Matrix4ToXNAMatrix(Microsoft.Kinect.Matrix4 mat)
        {
            Matrix converted = new Matrix();

            converted.M11 = mat.M11;
            converted.M12 = mat.M12;
            converted.M13 = mat.M13;
            converted.M21 = mat.M21;
            converted.M22 = mat.M22;
            converted.M23 = mat.M23;
            converted.M31 = mat.M31;
            converted.M32 = mat.M32;
            converted.M33 = mat.M33;
            converted.M44 = mat.M44;
            return(converted);
        }
 /// <summary>
 /// XNAMatrixToMatrix4 converts a XNA Matrix object holding Joint Orientation to a Kinect Matrix4.
 /// Matrix is initialized to zeros, and the joint orientation only holds a 3x3 rotation matrix.
 /// </summary>
 /// <param name="mat">An XNA Matrix object to be converted to a Kinect Matrix4.</param>
 /// <returns>Returns a Kinect Matrix4.</returns>
 public static Microsoft.Kinect.Matrix4 XNAMatrixToMatrix4(Matrix mat)
 {
     Microsoft.Kinect.Matrix4 converted = new Microsoft.Kinect.Matrix4();
     converted.M11 = mat.M11;
     converted.M12 = mat.M12;
     converted.M13 = mat.M13;
     converted.M21 = mat.M21;
     converted.M22 = mat.M22;
     converted.M23 = mat.M23;
     converted.M31 = mat.M31;
     converted.M32 = mat.M32;
     converted.M33 = mat.M33;
     converted.M44 = mat.M44;
     return converted;
 }