public override SEGMENT GetPoint(Single offset) { var sample = FindSample(offset); switch (sample.A.Degree) { case 0: return(sample.A.Point); case 1: return(new SEGMENT(CurveSampler.InterpolateLinear(sample.A.Point, sample.B.Point, sample.Amount))); case 3: return(new SEGMENT(CurveSampler.InterpolateCubic ( sample.A.Point, sample.A.OutgoingTangent, sample.B.Point, sample.B.IncomingTangent, sample.Amount ))); default: throw new NotSupportedException(); } }
public SEGMENT InterpolateLinear(SEGMENT left, SEGMENT right, float amount) { return(new SEGMENT(CurveSampler.InterpolateLinear(left, right, amount))); }
public float[] InterpolateLinear(float[] left, float[] right, float amount) { return(CurveSampler.InterpolateLinear(left, right, amount)); }