// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using UnityEngine; namespace Microsoft.MixedReality.Toolkit.Input { /// /// Cursor Interface for handling input events and setting visibility. /// public interface IMixedRealityCursor : IMixedRealityFocusChangedHandler, IMixedRealitySourceStateHandler, IMixedRealityPointerHandler { /// /// The this is associated with. /// IMixedRealityPointer Pointer { get; set; } /// /// Surface distance to place the cursor off of the surface at /// float SurfaceCursorDistance { get; } /// /// The maximum distance the cursor can be with nothing hit /// float DefaultCursorDistance { get; set; } /// /// Position of the . /// Vector3 Position { get; } /// /// Rotation of the . /// Quaternion Rotation { get; } /// /// Local scale of the . /// Vector3 LocalScale { get; } /// /// Sets the visibility of the . /// /// True if cursor should be visible, false if not. void SetVisibility(bool visible); /// /// Utility method to destroy cursor dependencies (e.g. event subscriptions) in the system /// explicitly in the middle update loop. This is a "replacement" of Unity OnDestroy. /// Relying on Unity OnDestroy may cause event handler subscription to /// become invalid at the point of destroying. /// void Destroy(); /// /// Is the cursor currently visible? /// bool IsVisible { get; } /// /// Sets the visibility of the when the source is detected. /// bool SetVisibilityOnSourceDetected { get; set; } /// /// Returns the 's GameObject reference. /// /// The GameObject this component is attached to. GameObject GameObjectReference { get; } } }