using System.Collections.Generic;
namespace UnityEngine.Splines
{
///
/// A key-value pair associating a distance to interpolation ratio ('t') value. This is used when evaluating Spline
/// attributes to ensure uniform ditribution of sampling points.
///
///
public struct DistanceToInterpolation
{
///
/// Distance in Unity units.
///
public float Distance;
///
/// A normalized interpolation ratio ('t').
///
public float T;
}
///
/// ISpline defines the interface from which Spline types inherit.
///
public interface ISpline : IReadOnlyList
{
///
/// Whether the spline is open (has a start and end point) or closed (forms an unbroken loop).
///
bool Closed { get; }
///
/// Return the sum of all curve lengths, accounting for state.
///
///
/// Returns the sum length of all curves composing this spline, accounting for closed state.
///
float GetLength();
///
/// Get a from a knot index.
///
/// The knot index that serves as the first control point for this curve.
///
/// A formed by the knot at index and the next knot.
///
public BezierCurve GetCurve(int index);
///
/// Return the length of a curve.
///
/// The index of the curve for which the length needs to be retrieved
///
///
/// Returns the length of the curve of index 'index' in the spline.
///
public float GetCurveLength(int index);
///
/// Return the interpolation ratio (0 to 1) corresponding to a distance on a . Distance
/// is relative to the curve.
///
/// The zero-based index of the curve.
/// The distance (measuring from the knot at curveIndex) to convert to a normalized interpolation ratio.
/// The normalized interpolation ratio matching distance on the designated curve.
public float GetCurveInterpolation(int curveIndex, float curveDistance);
}
}