using System;
using UnityEngine.Scripting.APIUpdating;
namespace UnityEngine.XR.Interaction.Toolkit.Interactors
{
///
/// Enum representing the two modes of scaling: and .
///
///
///
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public enum ScaleMode
{
///
/// No scale mode is active or supported.
/// Use this when a controller does not support scaling or when scaling is not needed.
///
None,
///
/// Scale over time mode: The scale is resized over time and represented by input in range of -1 to 1.
/// This mode is typically used with a thumbstick input on a controller.
///
ScaleOverTime,
///
/// (Deprecated) Use instead.
///
[Obsolete("Input has been renamed in version 3.0.0. Use ScaleOverTime instead. (UnityUpgradable) -> ScaleOverTime")]
Input = ScaleOverTime,
///
/// Distance scale mode: The scale is based on the delta distance between 2 physical (or virtual) inputs, such as
/// the pinch gap between fingers where the distance is calculated based on the screen DPI, and delta from the previous frame.
/// This mode is typically used with a touchscreen for mobile AR.
///
DistanceDelta,
///
/// (Deprecated) Use instead.
///
[Obsolete("Distance has been renamed in version 3.0.0. Use DistanceDelta instead. (UnityUpgradable) -> DistanceDelta")]
Distance = DistanceDelta,
}
///
/// Defines an interface for scale value providers.
///
///
/// Implementations of this interface provide a mechanism to get a scale value (a change in scale)
/// from an input control, such as a gesture or controller stick movement. The provided scale value is in the
/// mode supported by the upstream controller.
///
///
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRScaleValueProvider
{
///
/// Property representing the scale mode that is supported by the implementation of the interface.
///
///
ScaleMode scaleMode { get; set; }
///
/// This is the current scale value for the specified scale mode. This value should be updated
/// by the implementing class when other inputs are handled during the standard interaction processing loop.
///
///
float scaleValue { get; }
}
}