docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SplinePath

    The SplinePath type is an implementation of ISpline that is composed of multiple sections of other splines (see SplineSlice<T>). This is useful when you want to evaluate a path that follows multiple splines, typically in the case where splines share linked knots.

    This class is a data structure that defines the range of curves to associate together. This class is not meant to be used intensively for runtime evaluation because it is not performant. Data is not meant to be stored in that struct and that struct is not reactive to spline changes. The GameObject that contains this slice can be scaled and the knots of the targeted spline that can moved around the curve length cannot be stored here so evaluating positions, tangents and up vectors is expensive.

    If performance is a critical requirement, create a new Spline or NativeSpline from your SplinePath<T>. Note that you might pass a SplinePath<T> to constructors for both Spline and NativeSpline.

    Inheritance
    object
    SplinePath<SplineSlice<Spline>>
    SplinePath
    Implements
    ISpline
    IReadOnlyList<BezierKnot>
    IReadOnlyCollection<BezierKnot>
    IEnumerable<BezierKnot>
    IEnumerable
    IHasEmptyCurves
    Inherited Members
    SplinePath<SplineSlice<Spline>>.Slices
    SplinePath<SplineSlice<Spline>>.GetEnumerator()
    SplinePath<SplineSlice<Spline>>.Count
    SplinePath<SplineSlice<Spline>>.this[int]
    SplinePath<SplineSlice<Spline>>.this[SplineKnotIndex]
    SplinePath<SplineSlice<Spline>>.Closed
    SplinePath<SplineSlice<Spline>>.GetLength()
    SplinePath<SplineSlice<Spline>>.EmptyCurves
    SplinePath<SplineSlice<Spline>>.GetCurve(int)
    SplinePath<SplineSlice<Spline>>.GetCurveLength(int)
    SplinePath<SplineSlice<Spline>>.GetCurveUpVector(int, float)
    SplinePath<SplineSlice<Spline>>.GetCurveInterpolation(int, float)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Splines
    Assembly: Unity.Splines.dll
    Syntax
    public class SplinePath : SplinePath<SplineSlice<Spline>>, ISpline, IReadOnlyList<BezierKnot>, IReadOnlyCollection<BezierKnot>, IEnumerable<BezierKnot>, IEnumerable, IHasEmptyCurves

    Constructors

    SplinePath(IEnumerable<SplineSlice<Spline>>)

    Creates a new SplinePath from a collection of SplineSlice<T>.

    Declaration
    public SplinePath(IEnumerable<SplineSlice<Spline>> slices)
    Parameters
    Type Name Description
    IEnumerable<SplineSlice<Spline>> slices

    The splines to create this path with.

    See Also
    SplineRange
    KnotLinkCollection
    SplineKnotIndex

    Implements

    ISpline
    IReadOnlyList<T>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    IHasEmptyCurves

    Extension Methods

    SplineUtility.CalculateLength<T>(T, float4x4)
    SplineUtility.CalculateUpVector<T>(T, float)
    SplineUtility.ConvertIndexUnit<T>(T, float, PathIndexUnit)
    SplineUtility.ConvertIndexUnit<T>(T, float, PathIndexUnit, PathIndexUnit)
    SplineUtility.CurveToSplineT<T>(T, float)
    SplineUtility.EvaluateAcceleration<T>(T, float)
    SplineUtility.EvaluateCurvatureCenter<T>(T, float)
    SplineUtility.EvaluateCurvature<T>(T, float)
    SplineUtility.EvaluatePosition<T>(T, float)
    SplineUtility.EvaluateTangent<T>(T, float)
    SplineUtility.EvaluateUpVector<T>(T, float)
    SplineUtility.Evaluate<T>(T, float, out float3, out float3, out float3)
    SplineUtility.GetBounds<T>(T)
    SplineUtility.GetBounds<T>(T, float4x4)
    SplineUtility.GetCurveCount<T>(T)
    SplineUtility.GetPointAtLinearDistance<T>(T, float, float, out float)
    SplineUtility.NextIndex<T>(T, int)
    SplineUtility.Next<T>(T, int)
    SplineUtility.PreviousIndex<T>(T, int)
    SplineUtility.Previous<T>(T, int)
    SplineUtility.SplineToCurveT<T>(T, float, out float)

    See Also

    SplineRange
    KnotLinkCollection
    SplineKnotIndex
    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)