C# Class KerbCam.SplineUtil

Utility functions for splines.
Datei anzeigen Open project: huin/kerbcam

Public Methods

Method Description
AreParamsClose ( float t0, float t1 ) : bool
CubicHermite ( float t, float p0, float m0, float p1, float m1 ) : float

Interpolates a value using a the Cubic Hermite spline formula. http://en.wikipedia.org/wiki/Cubic_Hermite_spline

Linear ( float t, float p0, float p1 ) : float
T ( float ta, float tb, float tc, float pa, float pb, float pc ) : float

Method Details

AreParamsClose() public static method

public static AreParamsClose ( float t0, float t1 ) : bool
t0 float
t1 float
return bool

CubicHermite() public static method

Interpolates a value using a the Cubic Hermite spline formula. http://en.wikipedia.org/wiki/Cubic_Hermite_spline
public static CubicHermite ( float t, float p0, float m0, float p1, float m1 ) : float
t float The parameter, this should typically be between 0 and 1.
p0 float The value at t=0.
m0 float The tangent at t=0.
p1 float The value at t=1.
m1 float The tangent at t=1.
return float

Linear() public static method

public static Linear ( float t, float p0, float p1 ) : float
t float
p0 float
p1 float
return float

T() public static method

public static T ( float ta, float tb, float tc, float pa, float pb, float pc ) : float
ta float
tb float
tc float
pa float
pb float
pc float
return float