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 XEFHandData FromReader(BinaryReader reader)
        {
            XEFHandData handData = new XEFHandData();

            handData.HandState         = (XEFHandState)reader.ReadInt32();
            handData.HandTrackingState = (XEFTrackingState)reader.ReadInt32();
            handData.HandConfidence    = (XEFTrackingState)reader.ReadInt32();
            return(handData);
        }