Class ComputeAnimationCurve<T>
- Namespace
- Stride.Animations
- Assembly
- 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 : structType Parameters
- T
- Sampled data's type 
- Inheritance
- 
      objectComputeAnimationCurve<T>
- Implements
- Derived
- Inherited Members
Properties
KeyFrames
public TrackingCollection<AnimationKeyFrame<T>> KeyFrames { get; set; }Property Value
Methods
Compare(AnimationKeyFrame<T>, AnimationKeyFrame<T>)
When overridden in a derived class, performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other.
public override int Compare(AnimationKeyFrame<T> x, AnimationKeyFrame<T> y)Parameters
- xAnimationKeyFrame<T>
- The first object to compare. 
- yAnimationKeyFrame<T>
- The second object to compare. 
Returns
- int
- A signed integer that indicates the relative values of - xand- y, as shown in the following table.- Value - Meaning - Less than zero - xis less than- y.- Zero - xequals- y.- Greater than zero - xis greater than- y.
Exceptions
- ArgumentException
- Type - Tdoes not implement either the IComparable<T> generic interface or the IComparable interface.
Cubic(ref T, ref T, ref T, ref T, float, out T)
public abstract void Cubic(ref T value1, ref T value2, ref T value3, ref T value4, float t, out T result)Parameters
- value1T
- value2T
- value3T
- value4T
- tfloat
- resultT
Evaluate(float)
Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range
public T Evaluate(float location)Parameters
- locationfloat
- Location to sample at 
Returns
- T
- Sampled value 
Linear(ref T, ref T, float, out T)
public abstract void Linear(ref T value1, ref T value2, float t, out T result)Parameters
- value1T
- value2T
- tfloat
- resultT
SampleRaw(float)
Unoptimized sampler which searches all the keyframes in order. Intended to be used for baking purposes only
protected T SampleRaw(float t)Parameters
- tfloat
- Location t to sample at, between 0 and 1 
Returns
- T
- Sampled and interpolated data value 
UpdateChanges()
Updates any optimizations in the curve if data has changed.
public bool UpdateChanges()Returns
- bool
- truethere were changes since the last time; otherwise,- false.