ComputeAnimationCurve<T> Class
Namespace: Stride.AnimationsAssembly: Stride.Engine.dll
A node which describes a binary operation between two compute curves
[DataContract(Inherited = true)]
[Display("Animation", null, Expand = ExpandRule.Never)]
public abstract class ComputeAnimationCurve<T> : Comparer<AnimationKeyFrame<T>>, IComparer<AnimationKeyFrame<T>>, IComparer, IComputeCurve<T>, IComputeCurve where T : struct
Type Parameters
Name | Description |
---|---|
T | Sampled data's type |
Name | Description | |
---|---|---|
Properties | ||
KeyFrames | ||
Methods | ||
Compare(AnimationKeyFrame<T>, AnimationKeyFrame<T>) | ||
Cubic(ref T, ref T, ref T, ref T, Single, out T) | ||
Evaluate(Single) | Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range |
|
Linear(ref T, ref T, Single, out T) | ||
SampleRaw(Single) | Unoptimized sampler which searches all the keyframes in order. Intended to be used for baking purposes only |
|
UpdateChanges() | Updates any optimizations in the curve if data has changed. |
Properties
KeyFrames
public TrackingCollection<AnimationKeyFrame<T>> KeyFrames { get; set; }
Property Value
Type | Description |
---|---|
TrackingCollection<AnimationKeyFrame<T>> |
Methods
Compare(AnimationKeyFrame<T>, AnimationKeyFrame<T>)
public override int Compare(AnimationKeyFrame<T> x, AnimationKeyFrame<T> y)
Parameters
Type | Name | Description |
---|---|---|
AnimationKeyFrame<T> | x | |
AnimationKeyFrame<T> | y |
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
Cubic(ref T, ref T, ref T, ref T, Single, out T)
public abstract void Cubic(ref T value1, ref T value2, ref T value3, ref T value4, float t, out T result)
Parameters
Type | Name | Description |
---|---|---|
T | value1 | |
T | value2 | |
T | value3 | |
T | value4 | |
System.Single | t | |
T | result |
Evaluate(Single)
Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range
public T Evaluate(float location)
Parameters
Type | Name | Description |
---|---|---|
System.Single | location | Location to sample at |
Returns
Type | Description |
---|---|
T | Sampled value |
Linear(ref T, ref T, Single, out T)
public abstract void Linear(ref T value1, ref T value2, float t, out T result)
Parameters
Type | Name | Description |
---|---|---|
T | value1 | |
T | value2 | |
System.Single | t | |
T | result |
SampleRaw(Single)
Unoptimized sampler which searches all the keyframes in order. Intended to be used for baking purposes only
protected T SampleRaw(float t)
Parameters
Type | Name | Description |
---|---|---|
System.Single | t | Location t to sample at, between 0 and 1 |
Returns
Type | Description |
---|---|
T | Sampled and interpolated data value |
UpdateChanges()
Updates any optimizations in the curve if data has changed.
public bool UpdateChanges()
Returns
Type | Description |
---|---|
System.Boolean |
|