private List <KinectUser> createNewKinect(Body[] bodies) { var users = new List <KinectUser>(); var length = bodies.Length; for (int i = 0; i < length; i++) { var body = bodies[i]; if (!body.IsTracked) { continue; } var kinectuser = KinectUser.Create(body); users.Add(kinectuser); } return(users); }
private void BodyPartsProperties(JsonTextWriter jw, KinectUser user) { jw.WritePropertyName(BODY_PARTS); jw.WriteStartArray(); foreach (var bodyParts in user.bodyParts) { jw.WriteStartObject(); ToPairKeyValue(jw, NAME, bodyParts.name); ToPairKeyValue(jw, IS_PRESENT, bodyParts.present); ToPairKeyValue(jw, IS_TRACKED, bodyParts.tracked); this.BodyPartsPosititons(jw, bodyParts); jw.WriteEndObject(); } jw.WriteEndArray(); jw.WriteEndObject(); }