Exemplo n.º 1
0
 /// <summary>
 /// Log a kinect gesture
 /// </summary>
 /// <param name="gesture"></param>
 public void AddNewKinectGesture(KinectGesture gesture, Cell cell)
 {
     string message = "KINECT GESTURE" +
                      " Type: " + gesture.Type.ToString() +
                      " Direction: " + gesture.Direction.ToString() +
                      " Shape: " + gesture.Shape +
                      " Pointer: X = " + gesture.Pointer.X.ToString(System.Globalization.CultureInfo.InvariantCulture) + " Y = " + gesture.Pointer.Y.ToString(System.Globalization.CultureInfo.InvariantCulture) +
                      " Cell: X = " + cell.X + " Y = " + cell.Y;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Log a kinect gesture
 /// </summary>
 /// <param name="gesture"></param>
 public void AddNewKinectGesture(KinectGesture gesture, Cell cell)
 {
     string message = "KINECT GESTURE" +
                      " Type: " + gesture.Type.ToString() +
                      " Direction: " + gesture.Direction.ToString() +
                      " Shape: " + gesture.Shape +
                      " Pointer: X = " + gesture.Pointer.X.ToString(System.Globalization.CultureInfo.InvariantCulture) + " Y = " + gesture.Pointer.Y.ToString(System.Globalization.CultureInfo.InvariantCulture) +
                      " Cell: X = " + cell.X + " Y = " + cell.Y;
 }
Exemplo n.º 3
0
        void Kinect20__receiveGesture(Hands hand, KinectGesture gesture)
        {
            if (hand == Hands.Left)//left hand
            {
                switch (gesture)
                {
                case KinectGesture.LeftToRight:
                    this.txtGesture.Text = "Left Hand:LeftToRight";
                    break;

                //case KinectGesture.RightToLeft:
                //    this.txtGesture.Text = "Left Hand:RightToLeft";
                //    break;
                case KinectGesture.FrontToBack:
                    this.txtGesture.Text = "Left Hand:FrontToBack";
                    break;
                    //case KinectGesture.BackToFront:
                    //    this.txtGesture.Text = "Left Hand:BackToFront";
                    //    break;
                }
            }
            else if (hand == Hands.Right)//right hand
            {
                switch (gesture)
                {
                //case KinectGesture.LeftToRight:
                //    this.txtGesture.Text = "Right Hand:LeftToRight";
                //    break;
                case KinectGesture.RightToLeft:
                    this.txtGesture.Text = "Right Hand:RightToLeft";
                    break;

                case KinectGesture.FrontToBack:
                    this.txtGesture.Text = "Right Hand:FrontToBack";
                    break;
                    //case KinectGesture.BackToFront:
                    //    this.txtGesture.Text = "Right Hand:BackToFront";
                    //    break;
                }
            }
        }