public static void EnableVoiceCommand(Constants.Commands.VoiceCommandsEnum command) { bool enabled = false; if (command == Constants.Commands.VoiceCommandsEnum.BeginRoomTexture) { // Command: Begin texture capture protocol // (i.e. start up photocapture process) keywords.Add(Constants.Commands.Keyword_BeginRoomTexturing, () => { TextureCapture.BeginCapture(); }); enabled = true; } else if (command == Constants.Commands.VoiceCommandsEnum.RoomScreenshot) { // Command: Take texture screenshot keywords.Add(Constants.Commands.Keyword_RoomScreenshot, () => { TextureCapture.Capture(); }); } else if (command == Constants.Commands.VoiceCommandsEnum.EndRoomTexture) { // Command: End texture capture protocol and clean up keywords.Add(Constants.Commands.Keyword_EndRoomTexturing, () => { TextureCapture.EndCapture(); }); enabled = true; } if (enabled) { RefreshKeywordRecognizer(); } }
private static void GestureRecognizer_OnTappedEvent(InteractionSourceKind source, int tapCount, Ray headRay) { TextureCapture.Capture(); }