void AddToJointList(XmlNode skel, string jointstr, List <JointGait> joints) { JointTypeGait jointType; Enum.TryParse <JointTypeGait>(jointstr, out jointType); if (skel != null && skel[jointstr] != null) { string[] line = skel[jointstr].InnerText.Split(','); TrackingStateGait ts = StringToTrackingState(line[0]); float x, y, z, depthX, depthY; float.TryParse(line[1], out x); float.TryParse(line[2], out y); float.TryParse(line[3], out z); float.TryParse(line[4], out depthX); float.TryParse(line[5], out depthY); JointGait joint = new JointGait() { X = x, Y = y, Z = z, DepthX = depthX, DepthY = depthY, JointType = jointType, TrackingState = ts }; joints.Add(joint); } else { joints.Add(new JointGait() { JointType = jointType }); } }
public Frame(SensorType sensor, long frameNum, long frameTime, long currentTime, ulong trackingId, List <JointGait> joints, float groundW, float groundX, float groundY, float groundZ, int edges, float leanX, float leanY, TrackingStateGait leanTrackingState) { Sensor = sensor; FrameNumber = frameNum; FrameTime = frameTime; CurrentTime = currentTime; TrackingId = trackingId; Joints = joints; GroundW = groundW; GroundX = groundX; GroundY = groundY; GroundZ = groundZ; FrameEdges = edges; LeanX = leanX; LeanY = leanY; LeanTrackingState = leanTrackingState; }