docs.unity3d.com
    Show / Hide Table of Contents

    Interface ISpline

    ISpline defines the interface from which Spline types inherit.

    Namespace: UnityEngine.Splines
    Syntax
    public interface ISpline

    Properties

    Closed

    Whether the spline is open (has a start and end point) or closed (forms an unbroken loop).

    Declaration
    bool Closed { get; }
    Property Value
    Type Description
    Boolean

    Item[Int32]

    Get the knot at index.

    Declaration
    BezierKnot this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index

    The zero-based index of the knot.

    Property Value
    Type Description
    BezierKnot

    KnotCount

    Return the number of knots.

    Declaration
    int KnotCount { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetCurve(Int32)

    Get a BezierCurve from a knot index.

    Declaration
    BezierCurve GetCurve(int index)
    Parameters
    Type Name Description
    Int32 index

    The knot index that serves as the first control point for this curve.

    Returns
    Type Description
    BezierCurve

    A BezierCurve formed by the knot at index and the next knot.

    GetCurveLength(Int32)

    Return the length of a curve.

    Declaration
    float GetCurveLength(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    Single
    See Also
    GetLength()

    GetLength()

    Return the sum of all curve lengths, accounting for Closed state.

    Declaration
    float GetLength()
    Returns
    Type Description
    Single

    Returns the sum length of all curves composing this spline, accounting for closed state.

    Extension Methods

    SplineUtility.EvaluatePosition<T>(T, Single)
    SplineUtility.EvaluateDirection<T>(T, Single)
    SplineUtility.EvaluateUpVector<T>(T, Single)
    SplineUtility.SplineToCurveInterpolation<T>(T, Single, out Single)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023