// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using UnityEngine; namespace UltimateXR.Animation.Splines { public abstract partial class UxrSpline { #region Private Types & Data /// /// Pre-computed curve sample, used for arc-length parametrization. /// private class Sample { #region Public Types & Data /// /// Gets the global spline evaluation t value this sample represents. /// public float LerpT { get; } /// /// Gets the arc-length distance to the start of the spline. /// public float Distance { get; } /// /// Gets the interpolated spline value. /// public Vector3 Position { get; } #endregion #region Constructors & Finalizer /// /// Constructor /// /// Interpolation value [0.0, 1.0] between the spline start and end position. /// Arc-length distance to the start /// Spline position public Sample(float t, float distance, Vector3 position) { LerpT = t; Distance = distance; Position = position; } #endregion } #endregion } }