public static XEFBodyData FromReader(BinaryReader reader)
        {
            XEFBodyData bodyData = new XEFBodyData();

            foreach (XEFJointType jointType in Enum.GetValues(typeof(XEFJointType)))
            {
                bodyData.SkeletonJointPositions[jointType] = XEFVector.FromReader(reader);
            }

            foreach (XEFJointType jointType in Enum.GetValues(typeof(XEFJointType)))
            {
                bodyData.SkeletonJointOrientations[jointType] = XEFVector.FromReader(reader);
            }

            foreach (XEFJointType jointType in Enum.GetValues(typeof(XEFJointType)))
            {
                bodyData.SkeletonJointPositionTrackingStates[jointType] = (XEFTrackingState)reader.ReadInt32();
            }

            bodyData.ExpressionData = XEFExpressionData.FromReader(reader);

            bodyData.HandDataLeft  = XEFHandData.FromReader(reader);
            bodyData.HandDataRight = XEFHandData.FromReader(reader);

            reader.ReadInt32(); // padding

            bodyData.TrackingID    = reader.ReadUInt64();
            bodyData.TrackingState = (XEFBodyTrackingState)reader.ReadInt32();

            bodyData.LeanData = XEFLeanData.FromReader(reader);

            bodyData.QualityFlags = reader.ReadUInt32();

            return(bodyData);
        }
        public static XEFLeanData FromReader(BinaryReader reader)
        {
            XEFLeanData leanData = new XEFLeanData();

            leanData.X                 = reader.ReadSingle();
            leanData.Y                 = reader.ReadSingle();
            leanData.Reserved          = reader.ReadUInt32();
            leanData.LeanTrackingState = (XEFTrackingState)reader.ReadInt32();
            return(leanData);
        }