docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NativeCurve

    Burst friendly curve implementation used to efficiently work with animation curves in the job system.

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Utilities.Collections
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public struct NativeCurve : IDisposable

    Properties

    isCreated

    Informs if the native data structure has an allocated memory buffer.

    Declaration
    public bool isCreated { get; }
    Property Value
    Type Description
    bool

    Methods

    Dispose()

    Dispose native collection.

    Declaration
    public void Dispose()

    Evaluate(float)

    Evaluate value along the underlying native curve.

    Declaration
    public float Evaluate(float t)
    Parameters
    Type Name Description
    float t

    Location along curve to evaluate.

    Returns
    Type Description
    float

    Value along curve at given location t.

    Update(AnimationCurve, int)

    Re-initialize native curve data with new Animation curve.

    Declaration
    public void Update(AnimationCurve curve, int resolution)
    Parameters
    Type Name Description
    AnimationCurve curve

    Curve ground truth to initialize from.

    int resolution

    Number of samples to use when converting from animation curve to native curve.

    Implements

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