AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
IInputSource.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using UnityEngine;
5 
6 namespace HoloToolkit.Unity.InputModule
7 {
12  public interface IInputSource
13  {
17  SupportedInputInfo GetSupportedInputInfo(uint sourceId);
18 
24  bool SupportsInputInfo(uint sourceId, SupportedInputInfo inputInfo);
25 
26  bool TryGetSourceKind(uint sourceId, out InteractionSourceInfo sourceKind);
27 
35  bool TryGetPointerPosition(uint sourceId, out Vector3 position);
36 
44  bool TryGetGripPosition(uint sourceId, out Vector3 position);
45 
53  bool TryGetPointerRotation(uint sourceId, out Quaternion rotation);
54 
62  bool TryGetGripRotation(uint sourceId, out Quaternion rotation);
63 
71  bool TryGetPointingRay(uint sourceId, out Ray pointingRay);
72 
73  bool TryGetThumbstick(uint sourceId, out bool isPressed, out Vector2 position);
74  bool TryGetTouchpad(uint sourceId, out bool isPressed, out bool isTouched, out Vector2 position);
75  bool TryGetSelect(uint sourceId, out bool isPressed, out double pressedValue);
76  bool TryGetGrasp(uint sourceId, out bool isPressed);
77  bool TryGetMenu(uint sourceId, out bool isPressed);
78  }
79 }
SupportedInputInfo
Flags used to indicate which input information is supported by an input source.
Interface for an input source. An input source can be anything that a user can use to interact with a...
Definition: IInputSource.cs:12