Example #1
0
        void Tap_Tapped(SpatialGestureRecognizer sender, SpatialTappedEventArgs args)
        {
            var gaze = GazeInfo.FromHeadPose(args.TryGetPointerPose(referenceFrame.CoordinateSystem)?.Head);

            if (args.TapCount == 1)
            {
                Application.InvokeOnMain(() => app.OnGestureTapped(gaze));
            }
            if (args.TapCount == 2)
            {
                Application.InvokeOnMain(() => app.OnGestureDoubleTapped(gaze));
            }
        }
Example #2
0
        public override void OnGestureTapped(GazeInfo gaze)
        {
            if (_positionIsSelected)
            {
                ThrowBall();
            }

            if (_surfaceIsValid && !_positionIsSelected)
            {
                _positionIsSelected = true;
                _text3D.Text        = @"El Bruno - @elbruno
Now throw some balls !
AirTap to throw";
            }

            base.OnGestureTapped(gaze);
        }
Example #3
0
 public override void OnGestureTapped(GazeInfo gaze)
 {
     _showGaze             = !_showGaze;
     _cursor.CursorEnabled = _showGaze;
     base.OnGestureTapped(gaze);
 }
Example #4
0
        void Hold_HoldStarted(SpatialGestureRecognizer sender, SpatialHoldStartedEventArgs args)
        {
            var gaze = GazeInfo.FromHeadPose(args.TryGetPointerPose(referenceFrame.CoordinateSystem)?.Head);

            Application.InvokeOnMain(() => app.OnGestureHoldStarted(gaze));
        }
Example #5
0
 public override void OnGestureTapped(GazeInfo gaze)
 {
     PositionText();
     base.OnGestureTapped(gaze);
 }