docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NativeSpline

    A read-only representation of Spline that is optimized for efficient access and queries. NativeSpline can be constructed with a spline and Transform. If a transform is applied, all values will be relative to the transformed knot positions.

    Implements
    ISpline
    IReadOnlyList<BezierKnot>
    IReadOnlyCollection<BezierKnot>
    IEnumerable<BezierKnot>
    IEnumerable
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.Splines
    Assembly: solution.dll
    Syntax
    public struct NativeSpline : ISpline, IReadOnlyList<BezierKnot>, IReadOnlyCollection<BezierKnot>, IEnumerable<BezierKnot>, IEnumerable, IDisposable
    Remarks

    NativeSpline is compatible with the job system.

    Constructors

    Name Description
    NativeSpline(IReadOnlyList<BezierKnot>, bool, float4x4, bool, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(IReadOnlyList<BezierKnot>, bool, float4x4, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(IReadOnlyList<BezierKnot>, IReadOnlyList<int>, bool, float4x4, bool, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(IReadOnlyList<BezierKnot>, IReadOnlyList<int>, bool, float4x4, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(ISpline, bool, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(ISpline, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(ISpline, float4x4, bool, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    NativeSpline(ISpline, float4x4, Allocator)

    Create a new NativeSpline from a set of BezierKnot.

    Properties

    Name Description
    Closed

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

    Count

    Return the number of knots.

    Curves

    A NativeArray of BezierCurve that form this Spline.

    this[int]

    Get the knot at index.

    Knots

    A NativeArray of BezierKnot that form this Spline.

    Methods

    Name Description
    Dispose()

    Release allocated resources.

    GetCurve(int)

    Get a BezierCurve from a knot index.

    GetCurveInterpolation(int, float)

    Return the normalized interpolation (t) corresponding to a distance on a BezierCurve.

    GetCurveLength(int)

    Get the length of a BezierCurve.

    GetCurveUpVector(int, float)

    Return the up vector for a t ratio on the curve.

    GetEnumerator()

    Get an enumerator that iterates through the BezierKnot collection.

    GetLength()

    Return the sum of all curve lengths, accounting for Closed state. Note that this value is affected by the transform used to create this NativeSpline.

    Extension Methods

    SplineDataHandles.DataPointHandles<TSpline, TData>(TSpline, SplineData<TData>, bool)
    SplineDataHandles.DataPointHandles<TSpline, TData>(TSpline, SplineData<TData>, bool, int)
    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)
    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)