// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.Utilities; using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// /// Mixed Reality Toolkit controller definition, used to manage a specific controller type /// public interface IMixedRealityController { /// /// Is the controller enabled? /// bool Enabled { get; set; } /// /// Outputs the current state of the Input Source, whether it is tracked or not. As defined by the SDK / Unity. /// TrackingState TrackingState { get; } /// /// The designated hand that the Input Source is managing, as defined by the SDK / Unity. /// Handedness ControllerHandedness { get; } /// /// The registered Input Source for this controller /// IMixedRealityInputSource InputSource { get; } /// /// The controller's "Visual" Component in the scene. /// IMixedRealityControllerVisualizer Visualizer { get; } /// /// Indicates that this controller is currently providing position data. /// /// /// This value may change during usage for some controllers. As a best practice, /// be sure to check this value before using position data. /// bool IsPositionAvailable { get; } /// /// Indicates the accuracy of the position data being reported. /// bool IsPositionApproximate { get; } /// /// Indicates that this controller is currently providing rotation data. /// /// /// This value may change during usage for some controllers. As a best practice, /// be sure to check this value before using rotation data. /// bool IsRotationAvailable { get; } /// /// Mapping definition for this controller, linking the Physical inputs to logical Input System Actions /// MixedRealityInteractionMapping[] Interactions { get; } Vector3 AngularVelocity { get; } Vector3 Velocity { get; } /// /// Some controllers such as articulated should only be able /// to invoke pointing/distant interactions in certain poses. /// bool IsInPointingPose { get; } } }