docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GetPositionTangentNormal

    A job struct for calculating in parallel the position, tangent, and normal (up) vectors along a NativeSpline.

    Implements
    IJobParallelFor
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Splines
    Assembly: Unity.Splines.dll
    Syntax
    public struct GetPositionTangentNormal : IJobParallelFor

    Fields

    Normals

    A NativeArray of float3 to be written. The size of this array must match the length of Positions.

    Declaration
    [WriteOnly]
    public NativeArray<float3> Normals
    Field Value
    Type Description
    NativeArray<float3>

    Positions

    A NativeArray of float3 to be written. The size of this array determines how many positions are evaluated.

    Declaration
    [WriteOnly]
    public NativeArray<float3> Positions
    Field Value
    Type Description
    NativeArray<float3>

    Spline

    The NativeSpline to be evaluated.

    Declaration
    [ReadOnly]
    public NativeSpline Spline
    Field Value
    Type Description
    NativeSpline
    Remarks

    Must be allocated with a Allocator.Persistent or Allocator.TempJob.

    Tangents

    A NativeArray of float3 to be written. The size of this array must match the length of Positions.

    Declaration
    [WriteOnly]
    public NativeArray<float3> Tangents
    Field Value
    Type Description
    NativeArray<float3>

    Methods

    Execute(int)

    Called by the job system to evaluate position, tangent, and normal at an index. The interpolation value is calculated as index / positions.Length - 1.

    Declaration
    public void Execute(int index)
    Parameters
    Type Name Description
    int index

    The index of the positions array to evaluate.

    Implements

    IJobParallelFor
    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)