Struct NativeCurve
Burst friendly curve implementation used to efficiently work with animation curves in the job system.
Inherited Members
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
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. |