Exemplo n.º 1
0
        /// <summary>
        /// Handles the GestureRecognized event of the g control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="KinectSkeltonTracker.GestureEventArgs"/> instance containing the event data.</param>
        public void OnGestureRecognized(object sender, GestureEventArgs e)
        {
            if (this.GestureRecognized != null)
            {
                this.GestureRecognized(this, e);
            }

            foreach (Gesture g in this.gestures)
            {
                g.Reset();
            }
        }
Exemplo n.º 2
0
 private void OnGestureRecognized(object sender, GestureEventArgs e)
 {
     switch (e.GestureName)
     {
         //case "Menu":
         //    FinalGesture = "Menu";
         //    //Client.send("kinect", e, FinalGesture);
         //    break;
         case "Punch":
             FinalGesture = "Punch";
             break;
         case "Thrust":
             FinalGesture = "Thrust";
             break;
         case "WaveRight":
             FinalGesture = "Wave Right";
             break;
         case "WaveLeft":
             FinalGesture = "Wave Left";
             break;
         //case "JoinedHands":
         //    FinalGesture = "Joined Hands";
         //    break;
         case "Choose":
             FinalGesture = "Choice Made";
             break;
         case "Back":
             FinalGesture = "Back";
             break;
         case "SwipeLeft":
             FinalGesture = "Swipe Left";
             break;
         case "SwipeRight":
             FinalGesture = "Swipe Right";
             break;
         case "SwipeUp":
             FinalGesture = "Swipe Up";
             break;
         case "SwipeDown":
             FinalGesture = "Swipe Down";
             break;
         default:
             break;
     }
 }