Class LinearInterpolator
- Namespace
- Coherence.Interpolation
- Assembly
- Coherence.Interpolation.dll
The LinearInterpolator performs a linear blend between two adjacent samples. The LinearInterpolator is defined for types int, long, float, Vector2, Vector3, Color and Quaternion (using UnityEngine.Quaternion.Slerp(UnityEngine.Quaternion,UnityEngine.Quaternion,System.Single)).
public class LinearInterpolator : Interpolator
- Inheritance
-
LinearInterpolator
- Inherited Members
Constructors
LinearInterpolator()
public LinearInterpolator()
Properties
NumberOfSamplesToStayBehind
Number of leading samples required for this interpolation method, added to Delay. Linear interpolation requires one sample ahead (and one behind) to produce valid results while splines require two samples ahead and behind. The default Interpolator requires no samples ahead or behind because since it simply applies the most recent sample with no blending.
public override int NumberOfSamplesToStayBehind { get; }
Property Value
Methods
InterpolateByte(byte, byte, float)
public override byte InterpolateByte(byte value1, byte value2, float t)
Parameters
Returns
InterpolateColor(Color, Color, float)
public override Color InterpolateColor(Color value1, Color value2, float t)
Parameters
Returns
InterpolateDouble(double, double, float)
public override double InterpolateDouble(double value1, double value2, float t)
Parameters
Returns
InterpolateFloat(float, float, float)
public override float InterpolateFloat(float value1, float value2, float t)
Parameters
Returns
InterpolateInt(int, int, float)
public override int InterpolateInt(int value1, int value2, float t)
Parameters
Returns
InterpolateLong(long, long, float)
public override long InterpolateLong(long value1, long value2, float t)
Parameters
Returns
InterpolateQuaternion(Quaternion, Quaternion, float)
public override Quaternion InterpolateQuaternion(Quaternion value1, Quaternion value2, float t)
Parameters
value1
Quaternionvalue2
Quaterniont
float
Returns
InterpolateSByte(sbyte, sbyte, float)
public override sbyte InterpolateSByte(sbyte value1, sbyte value2, float t)
Parameters
Returns
InterpolateShort(short, short, float)
public override short InterpolateShort(short value1, short value2, float t)
Parameters
Returns
InterpolateUInt(uint, uint, float)
public override uint InterpolateUInt(uint value1, uint value2, float t)
Parameters
Returns
InterpolateULong(ulong, ulong, float)
public override ulong InterpolateULong(ulong value1, ulong value2, float t)
Parameters
Returns
InterpolateUShort(ushort, ushort, float)
public override ushort InterpolateUShort(ushort value1, ushort value2, float t)
Parameters
Returns
InterpolateVector2(Vector2, Vector2, float)
public override Vector2 InterpolateVector2(Vector2 value1, Vector2 value2, float t)
Parameters
Returns
InterpolateVector3(Vector3, Vector3, float)
public override Vector3 InterpolateVector3(Vector3 value1, Vector3 value2, float t)
Parameters
value1
Vector3value2
Vector3t
float
Returns
- Vector3