Exemple #1
0
 private void GestureHoldCanceled(HoldCanceledEventArgs args)
 {
     if (CorrectHand(args.source))
     {
         Transmitter.SendButton(_tracker, "hold", false);
     }
 }
Exemple #2
0
 private void GestureNavigationCompleted(NavigationCompletedEventArgs args)
 {
     if (CorrectHand(args.source))
     {
         Transmitter.SendButton(_tracker, "navigation", false);
         SetNavigation(0f, 0f, 0f);
     }
 }
Exemple #3
0
 // Navigation Updated
 private void GestureNavigationUpdated(NavigationUpdatedEventArgs args)
 {
     if (CorrectHand(args.source))
     {
         Transmitter.SendButton(_tracker, "navigation", true);
         SetNavigation(args.normalizedOffset.x, args.normalizedOffset.y, args.normalizedOffset.z);
     }
 }
Exemple #4
0
 // Manipulation Ended
 private void GestureManipulationCanceled(ManipulationCanceledEventArgs args)
 {
     if (CorrectHand(args.source))
     {
         Transmitter.SendButton(_tracker, "manipulation", false);
         SetManipulation(0f, 0f, 0f);
     }
 }
Exemple #5
0
 // Manipulation Updated
 private void GestureManipulationUpdated(ManipulationUpdatedEventArgs args)
 {
     if (CorrectHand(args.source))
     {
         Transmitter.SendButton(_tracker, "manipulation", true);
         SetManipulation(args.cumulativeDelta.x, args.cumulativeDelta.y, args.cumulativeDelta.z);
     }
 }
Exemple #6
0
        private void SpeechRecognition(string text, ConfidenceLevel confidence)
        {
            if (confidence != ConfidenceLevel.Rejected)
            {
                string button = $"speech: { text }";

                // TODO: check that button exists

                Transmitter.SendButton(_tracker, button, true);
            }
        }
Exemple #7
0
 private void GestureTapped(TappedEventArgs args)
 {
     if (!CorrectHand(args.source))
     {
         return;
     }
     if (args.tapCount == 1)
     {
         Transmitter.SendButton(_tracker, "tap", null);
     }
     else
     {
         Transmitter.SendButton(_tracker, "double_tap", null);
     }
 }
Exemple #8
0
 private void SetNavigation(float x, float y, float z)
 {
     Transmitter.SendButton(_tracker, "navigation_x", x);
     Transmitter.SendButton(_tracker, "navigation_y", y);
     Transmitter.SendButton(_tracker, "navigation_z", z);
 }
Exemple #9
0
 private void SetManipulation(float x, float y, float z)
 {
     Transmitter.SendButton(_tracker, "manipulation_x", x);
     Transmitter.SendButton(_tracker, "manipulation_y", y);
     Transmitter.SendButton(_tracker, "manipulation_z", z);
 }