Table of Contents

Class SplineInterpolator

Namespace
Coherence.Interpolation
Assembly
Coherence.Interpolation.dll

The SplineInterpolator blends sample values smoothly using a Catmull-Rom curve. The SplineInterpolator is defined for types float, Vector2 and Vector3.

public class SplineInterpolator : Interpolator
Inheritance
SplineInterpolator
Inherited Members

Constructors

SplineInterpolator()

public SplineInterpolator()

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

int

Methods

InterpolateDouble(double, double, double, double, float)

public override double InterpolateDouble(double p0, double p1, double p2, double p3, float t)

Parameters

p0 double
p1 double
p2 double
p3 double
t float

Returns

double

InterpolateFloat(float, float, float, float, float)

public override float InterpolateFloat(float p0, float p1, float p2, float p3, float t)

Parameters

p0 float
p1 float
p2 float
p3 float
t float

Returns

float

InterpolateVector2(Vector2, Vector2, Vector2, Vector2, float)

public override Vector2 InterpolateVector2(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t)

Parameters

p0 Vector2
p1 Vector2
p2 Vector2
p3 Vector2
t float

Returns

Vector2

InterpolateVector3(Vector3, Vector3, Vector3, Vector3, float)

public override Vector3 InterpolateVector3(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t)

Parameters

p0 Vector3
p1 Vector3
p2 Vector3
p3 Vector3
t float

Returns

Vector3