docs.unity3d.com
    Show / Hide Table of Contents

    Struct NativeCurve

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

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

    Properties

    isCreated

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

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

    Methods

    Dispose()

    Dispose native collection.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    Evaluate(Single)

    Evaluate value along the underlying native curve.

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

    Location along curve to evaluate.

    Returns
    Type Description
    Single

    Value along curve at given location t.

    Update(AnimationCurve, Int32)

    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.

    Int32 resolution

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

    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