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