예제 #1
0
        public void checkClick2(Gesture g)
        {
            if (g != null && g.id == GestureID.SwipeRight)
            {
                //Console.WriteLine("Registered a swipe");
                //Joint lefth = new Joint().ScaleTo(1600, 1200, 0.75f, 0.75f);

                //double theta = nui.NuiCamera.ElevationAngle * Math.PI / 180;

                //SetCursorPos((int)lefth.Position.X,
                //    (int)(lefth.Position.Y * Math.Cos(theta) + lefth.Position.Z * Math.Sin(theta)));
                RightMouseDown();
                RightMouseUp();
            }
            else if (g != null && g.id == GestureID.SwipeLeft)
            {
                LeftMouseDown();
                LeftMouseUp();
            }
            else if (g != null && g.id == GestureID.SwipeUp)
                LeftMouseDown();
            else if (g != null && g.id == GestureID.SwipeDown)
                LeftMouseUp();

        }
예제 #2
0
        public void checkClick(Gesture g)
        {
            if (g != null && g.id == GestureID.Push)
            {
                Console.WriteLine("Registered a push");
                //Joint lefth = new Joint().ScaleTo(1600, 1200, 0.75f, 0.75f);

                //double theta = nui.NuiCamera.ElevationAngle * Math.PI / 180;

                //SetCursorPos((int)lefth.Position.X,
                //    (int)(lefth.Position.Y * Math.Cos(theta) + lefth.Position.Z * Math.Sin(theta)));
                LeftMouseDown();
                LeftMouseUp();
            }

            if (g != null && g.id == GestureID.Pull)
            {
                Console.WriteLine("Registered a pull");
                LeftMouseUp();
            }

        }