Class Interpolator
- Namespace
- Coherence.Interpolation
- Assembly
- Coherence.Interpolation.dll
Base class used for blending between sample points. The base implementation simply provides latest data sampling so that values "snap" to the sample that is latest. By sub-classing and overriding these methods, more refined interpolation can be achieved (see LinearInterpolator and SplineInterpolator). Interpolation can be implemented either using 2 samples or 4 samples. Methods are specified for all supported types, taking sample values as parameters together with the time t that is expressed as a fraction between value1 and value2. Unless the 4 sample methods are overriden, they will simply call the corresponding 2 sample methods that will suffice for most types of interpolation.
public class Interpolator
- Inheritance
-
Interpolator
- Derived
Constructors
Interpolator()
public Interpolator()
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 virtual int NumberOfSamplesToStayBehind { get; }
Property Value
Methods
InterpolateBoolean(bool, bool, bool, bool, float)
public virtual bool InterpolateBoolean(bool value0, bool value1, bool value2, bool value3, float t)
Parameters
Returns
InterpolateBoolean(bool, bool, float)
public virtual bool InterpolateBoolean(bool value1, bool value2, float t)
Parameters
Returns
InterpolateByte(byte, byte, byte, byte, float)
public virtual byte InterpolateByte(byte value0, byte value1, byte value2, byte value3, float t)
Parameters
Returns
InterpolateByte(byte, byte, float)
public virtual byte InterpolateByte(byte value1, byte value2, float t)
Parameters
Returns
InterpolateBytes(byte[], byte[], byte[], byte[], float)
public virtual byte[] InterpolateBytes(byte[] value0, byte[] value1, byte[] value2, byte[] value3, float t)
Parameters
Returns
- byte[]
InterpolateBytes(byte[], byte[], float)
public virtual byte[] InterpolateBytes(byte[] value1, byte[] value2, float t)
Parameters
Returns
- byte[]
InterpolateChar(char, char, char, char, float)
public virtual char InterpolateChar(char value0, char value1, char value2, char value3, float t)
Parameters
Returns
InterpolateChar(char, char, float)
public virtual char InterpolateChar(char value1, char value2, float t)
Parameters
Returns
InterpolateColor(Color, Color, float)
public virtual Color InterpolateColor(Color value1, Color value2, float t)
Parameters
Returns
InterpolateColor(Color, Color, Color, Color, float)
public virtual Color InterpolateColor(Color value0, Color value1, Color value2, Color value3, float t)
Parameters
Returns
InterpolateDouble(double, double, double, double, float)
public virtual double InterpolateDouble(double value0, double value1, double value2, double value3, float t)
Parameters
Returns
InterpolateDouble(double, double, float)
public virtual double InterpolateDouble(double value1, double value2, float t)
Parameters
Returns
InterpolateEntityReference(Entity, Entity, Entity, Entity, float)
public virtual Entity InterpolateEntityReference(Entity value0, Entity value1, Entity value2, Entity value3, float t)
Parameters
Returns
InterpolateEntityReference(Entity, Entity, float)
public virtual Entity InterpolateEntityReference(Entity value1, Entity value2, float t)
Parameters
Returns
InterpolateFloat(float, float, float)
public virtual float InterpolateFloat(float value1, float value2, float t)
Parameters
Returns
InterpolateFloat(float, float, float, float, float)
public virtual float InterpolateFloat(float value0, float value1, float value2, float value3, float t)
Parameters
Returns
InterpolateInt(int, int, int, int, float)
public virtual int InterpolateInt(int value0, int value1, int value2, int value3, float t)
Parameters
Returns
InterpolateInt(int, int, float)
public virtual int InterpolateInt(int value1, int value2, float t)
Parameters
Returns
InterpolateLong(long, long, long, long, float)
public virtual long InterpolateLong(long value0, long value1, long value2, long value3, float t)
Parameters
Returns
InterpolateLong(long, long, float)
public virtual long InterpolateLong(long value1, long value2, float t)
Parameters
Returns
InterpolateQuaternion(Quaternion, Quaternion, float)
public virtual Quaternion InterpolateQuaternion(Quaternion value1, Quaternion value2, float t)
Parameters
value1
Quaternionvalue2
Quaterniont
float
Returns
InterpolateQuaternion(Quaternion, Quaternion, Quaternion, Quaternion, float)
public virtual Quaternion InterpolateQuaternion(Quaternion value0, Quaternion value1, Quaternion value2, Quaternion value3, float t)
Parameters
value0
Quaternionvalue1
Quaternionvalue2
Quaternionvalue3
Quaterniont
float
Returns
InterpolateSByte(sbyte, sbyte, sbyte, sbyte, float)
public virtual sbyte InterpolateSByte(sbyte value0, sbyte value1, sbyte value2, sbyte value3, float t)
Parameters
Returns
InterpolateSByte(sbyte, sbyte, float)
public virtual sbyte InterpolateSByte(sbyte value1, sbyte value2, float t)
Parameters
Returns
InterpolateShort(short, short, short, short, float)
public virtual short InterpolateShort(short value0, short value1, short value2, short value3, float t)
Parameters
Returns
InterpolateShort(short, short, float)
public virtual short InterpolateShort(short value1, short value2, float t)
Parameters
Returns
InterpolateString(string, string, float)
public virtual string InterpolateString(string value1, string value2, float t)
Parameters
Returns
InterpolateString(string, string, string, string, float)
public virtual string InterpolateString(string value0, string value1, string value2, string value3, float t)
Parameters
Returns
InterpolateUInt(uint, uint, float)
public virtual uint InterpolateUInt(uint value1, uint value2, float t)
Parameters
Returns
InterpolateUInt(uint, uint, uint, uint, float)
public virtual uint InterpolateUInt(uint value0, uint value1, uint value2, uint value3, float t)
Parameters
Returns
InterpolateULong(ulong, ulong, float)
public virtual ulong InterpolateULong(ulong value1, ulong value2, float t)
Parameters
Returns
InterpolateULong(ulong, ulong, ulong, ulong, float)
public virtual ulong InterpolateULong(ulong value0, ulong value1, ulong value2, ulong value3, float t)
Parameters
Returns
InterpolateUShort(ushort, ushort, float)
public virtual ushort InterpolateUShort(ushort value1, ushort value2, float t)
Parameters
Returns
InterpolateUShort(ushort, ushort, ushort, ushort, float)
public virtual ushort InterpolateUShort(ushort value0, ushort value1, ushort value2, ushort value3, float t)
Parameters
Returns
InterpolateVector2(Vector2, Vector2, float)
public virtual Vector2 InterpolateVector2(Vector2 value1, Vector2 value2, float t)
Parameters
Returns
InterpolateVector2(Vector2, Vector2, Vector2, Vector2, float)
public virtual Vector2 InterpolateVector2(Vector2 value0, Vector2 value1, Vector2 value2, Vector2 value3, float t)
Parameters
Returns
InterpolateVector3(Vector3, Vector3, float)
public virtual Vector3 InterpolateVector3(Vector3 value1, Vector3 value2, float t)
Parameters
value1
Vector3value2
Vector3t
float
Returns
- Vector3
InterpolateVector3(Vector3, Vector3, Vector3, Vector3, float)
public virtual Vector3 InterpolateVector3(Vector3 value0, Vector3 value1, Vector3 value2, Vector3 value3, float t)
Parameters
value0
Vector3value1
Vector3value2
Vector3value3
Vector3t
float
Returns
- Vector3