using KinectUtils; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Kinect; namespace MyGestureBank { /// /// The hand up right posture. /// public class PostureHandUpRight : Posture { /// /// PostureHandUpRight constructor. /// public PostureHandUpRight() { GestureName = "HandUpRight"; } /// /// The test gesture method. /// /// public override void TestGesture(Body body) { if(TestPosture(body)) { OnGestureRecognized(); } } /// /// Tests the posture. /// /// /// A boolean indicating wheter the posture was detected or not. protected override bool TestPosture(Body body) { return body.Joints[JointType.HandRight].Position.Y > body.Joints[JointType.ShoulderRight].Position.Y; } } }