docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Evaluate

    Evaluate<TSpline, TInterpolator>(TSpline, float, PathIndexUnit, TInterpolator)

    Calculate an interpolated value at a given 't' along a spline.

    Declaration
    public T Evaluate<TSpline, TInterpolator>(TSpline spline, float t, PathIndexUnit indexUnit, TInterpolator interpolator) where TSpline : ISpline where TInterpolator : IInterpolator<T>
    Parameters
    Type Name Description
    TSpline spline

    The Spline to interpolate.

    float t

    The interpolator value. How this is interpreted is defined by PathIndexUnit.

    PathIndexUnit indexUnit

    The PathIndexUnit that t is represented as.

    TInterpolator interpolator

    The IInterpolator<T> to use. A collection of commonly used interpolators are available in the UnityEngine.Splines.Interpolators namespace.

    Returns
    Type Description
    T

    An interpolated value.

    Type Parameters
    Name Description
    TSpline

    The Spline type.

    TInterpolator

    The IInterpolator type.

    Evaluate<TSpline, TInterpolator>(TSpline, float, TInterpolator)

    Calculate an interpolated value at a given 't' along a spline.

    Declaration
    public T Evaluate<TSpline, TInterpolator>(TSpline spline, float t, TInterpolator interpolator) where TSpline : ISpline where TInterpolator : IInterpolator<T>
    Parameters
    Type Name Description
    TSpline spline

    The Spline to interpolate.

    float t

    The interpolator value. How this is interpreted is defined by PathIndexUnit.

    TInterpolator interpolator

    The IInterpolator<T> to use. A collection of commonly used interpolators are available in the UnityEngine.Splines.Interpolators namespace.

    Returns
    Type Description
    T

    An interpolated value.

    Type Parameters
    Name Description
    TSpline

    The Spline type.

    TInterpolator

    The IInterpolator type.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)