![]() |
Twilight Princess
Remastered version of the GameCube game
|
NativeCurve is a simple re-implementation of AnimationCurve in a Job/Burst friendly way. This container can be constructed directly from an AnimationCurve, or by using an array of keyframes. Once created this container cannot be modified, which makes it very safe to use from multiple threads at once. More...
Classes | |
struct | KeyFrame |
Public Member Functions | |
NativeCurve (AnimationCurve curve, Allocator allocator=Allocator.Persistent) | |
Constructs a new NativeCurve that is an exact copy of the input AnimationCurve. | |
NativeCurve (IList< Keyframe > keyframes, Allocator allocator=Allocator.Persistent, UnityEngine.WrapMode preWrapMode=UnityEngine.WrapMode.Clamp, UnityEngine.WrapMode postWrapMode=UnityEngine.WrapMode.Clamp) | |
Constructs a new NativeCurve given a list of Keyframes. Can optionally specify the pre and post wrap modes. | |
NativeCurve (IList< KeyFrame > keyframes, Allocator allocator=Allocator.Persistent, UnityEngine.WrapMode preWrapMode=UnityEngine.WrapMode.Clamp, UnityEngine.WrapMode postWrapMode=UnityEngine.WrapMode.Clamp) | |
Constructs a new NativeCurve given a list of KeyFrames. Can optionally specify the pre and post wrap modes. | |
NativeCurve (NativeSlice< KeyFrame > keyframes, Allocator allocator=Allocator.Persistent, UnityEngine.WrapMode preWrapMode=UnityEngine.WrapMode.Clamp, UnityEngine.WrapMode postWrapMode=UnityEngine.WrapMode.Clamp) | |
Constructs a new NativeCurve given a native slice of KeyFrames. Can optionally specify the pre and post wrap modes. | |
void | Dispose () |
Disposed of this container. Once disposed, it cannot be used. | |
float | Evaluate (float t) |
Evaluates the curve at the given time. | |
Public Attributes | |
DisposeSentinel | m_DisposeSentinel |
Properties | |
bool | IsCreated [get] |
Returns whether or not this NativeCurve has been created or not. Once disposed this method will return false. | |
int | Count [get] |
Returns the number of keyframes stored in this curve container. | |
float | StartTime [get] |
Returns the start time of this curve in seconds. | |
float | EndTime [get] |
Returns the end time of this curve in seconds. | |
float | Duration [get] |
Returns the duration of this curve in seconds. | |
KeyFrame | this[int index] [get, private set] |
Returns the KeyFrame located at the given index. | |
Private Member Functions | |
NativeCurve (int keyframes, Allocator allocator, UnityEngine.WrapMode preWrapMode, UnityEngine.WrapMode postWrapMode) | |
void | Init () |
void | AdjustTimeWithMode (ref float t, UnityEngine.WrapMode mode) |
float | EvalCurved (KeyFrame keyframe0, KeyFrame keyframe1, float time) |
Private Attributes | |
int | _count |
float | _startTime |
float | _endTime |
UnityEngine.WrapMode | _preWrapMode |
UnityEngine.WrapMode | _postWrapMode |
IntPtr | m_Buffer |
Allocator | m_AllocatorLabel |
NativeCurve is a simple re-implementation of AnimationCurve in a Job/Burst friendly way. This container can be constructed directly from an AnimationCurve, or by using an array of keyframes. Once created this container cannot be modified, which makes it very safe to use from multiple threads at once.
This container must be manually disposed of when you are finished with it, by calling Dispose. Alternatively you can also attribute it with [DeallocateOnJobCompletion] and it will be automatically disposed of when that job is finished.
NOTE that this curve representation does not currently support custom curve weights!
Unity.Collections.NativeCurve.NativeCurve | ( | AnimationCurve | curve, |
Allocator | allocator = Allocator::Persistent ) |
Constructs a new NativeCurve that is an exact copy of the input AnimationCurve.
Unity.Collections.NativeCurve.NativeCurve | ( | IList< Keyframe > | keyframes, |
Allocator | allocator = Allocator::Persistent, | ||
UnityEngine.WrapMode | preWrapMode = UnityEngine::WrapMode::Clamp, | ||
UnityEngine.WrapMode | postWrapMode = UnityEngine::WrapMode::Clamp ) |
Constructs a new NativeCurve given a list of Keyframes. Can optionally specify the pre and post wrap modes.
Unity.Collections.NativeCurve.NativeCurve | ( | IList< KeyFrame > | keyframes, |
Allocator | allocator = Allocator::Persistent, | ||
UnityEngine.WrapMode | preWrapMode = UnityEngine::WrapMode::Clamp, | ||
UnityEngine.WrapMode | postWrapMode = UnityEngine::WrapMode::Clamp ) |
Constructs a new NativeCurve given a list of KeyFrames. Can optionally specify the pre and post wrap modes.
Unity.Collections.NativeCurve.NativeCurve | ( | NativeSlice< KeyFrame > | keyframes, |
Allocator | allocator = Allocator::Persistent, | ||
UnityEngine.WrapMode | preWrapMode = UnityEngine::WrapMode::Clamp, | ||
UnityEngine.WrapMode | postWrapMode = UnityEngine::WrapMode::Clamp ) |
Constructs a new NativeCurve given a native slice of KeyFrames. Can optionally specify the pre and post wrap modes.
|
private |
|
private |
void Unity.Collections.NativeCurve.Dispose | ( | ) |
Disposed of this container. Once disposed, it cannot be used.
|
private |
float Unity.Collections.NativeCurve.Evaluate | ( | float | t | ) |
Evaluates the curve at the given time.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
DisposeSentinel Unity.Collections.NativeCurve.m_DisposeSentinel |
|
get |
Returns the number of keyframes stored in this curve container.
|
get |
Returns the duration of this curve in seconds.
|
get |
Returns the end time of this curve in seconds.
|
get |
Returns whether or not this NativeCurve has been created or not. Once disposed this method will return false.
|
get |
Returns the start time of this curve in seconds.
|
getprivate set |
Returns the KeyFrame located at the given index.