Class ComputeCurveSampler<T>
- Namespace
- Stride.Animations
- Assembly
- Stride.Engine.dll
Base interface for curve based compute value nodes.
[DataContract(Inherited = true)]
public abstract class ComputeCurveSampler<T> where T : struct
Type Parameters
T
- Inheritance
-
ComputeCurveSampler<T>
- Derived
Constructors
ComputeCurveSampler()
protected ComputeCurveSampler()
Fields
curve
protected IComputeCurve<T> curve
Field Value
Properties
Curve
[DataMember(10)]
[Display("Curve", null)]
public IComputeCurve<T> Curve { get; set; }
Property Value
Methods
Evaluate(float)
Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range
public T Evaluate(float t)
Parameters
t
float
Returns
- T
Sampled value
Linear(ref T, ref T, float, out T)
Interface for linera interpolation between two data values
public abstract void Linear(ref T value1, ref T value2, float t, out T result)
Parameters
value1
TLeft value
value2
TRight value
t
floatLerp amount between 0 and 1
result
TThe interpolated result of linearLerp(L, R, t)
UpdateChanges()
public bool UpdateChanges()