using System;
using Unity.Collections;
using UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.State;
using UnityEngine.XR.Interaction.Toolkit.Utilities.Collections;
namespace UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Jobs
{
///
/// Struct holding all data needed to compute a tween job.
///
/// Struct type of tween output.
[Obsolete("The Affordance System namespace and all associated classes have been deprecated. The existing affordance system will be moved, replaced and updated with a new interaction feedback system in a future version of XRI.")]
public struct TweenJobData where T : struct
{
///
/// Square distance value used to evaluate if the tween should just snap to the target value.
///
public const float squareSnapDistanceThreshold = 0.0005f * 0.0005f;
///
/// Total number of supported increments for the affordance state transition amount float conversion.
///
///
public const byte totalStateTransitionIncrements = AffordanceStateData.totalStateTransitionIncrements;
///
/// Initial value for variable or receiver being tweened.
///
public T initialValue;
///
/// Affordance state lower bound. Used with and to find tween target.
///
public T stateOriginValue;
///
/// Affordance state upper bound. Used with and to find tween target.
///
public T stateTargetValue;
///
/// State transition amount represented as a byte. Converted to float by dividing over .
///
///
public byte stateTransitionIncrement;
///
/// 0-1 Float representation of .
///
///
public float stateTransitionAmountFloat => (float)stateTransitionIncrement / totalStateTransitionIncrements;
///
/// Native curve used to evaluate the tweens using the , , and .
///
public NativeCurve nativeCurve;
///
/// Tween starting value. Used with computed tween target by evaluating the between origin and target values.
///
public T tweenStartValue;
///
/// Interpolation value between 0-1 used to interpolate between the tween start value and the computed target value.
///
public float tweenAmount;
///
/// Native array with 1 value used to store the tween output.
///
public NativeArray outputData;
}
}