Class MyInterpolationQueue<T>
Inheritance
System.Object
MyInterpolationQueue<T>
Assembly: VRage.Library.dll
Syntax
public class MyInterpolationQueue<T> : Object
Type Parameters
Constructors
MyInterpolationQueue(Int32, InterpolationHandler<T>)
Declaration
public MyInterpolationQueue(int defaultCapacity, InterpolationHandler<T> interpolator)
Parameters
Properties
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
LastSample
Declaration
public MyTimeSpan LastSample { get; }
Property Value
Methods
AddSample(ref T, MyTimeSpan)
Adds sample with timestamp, it must be larger than last timestamp!
Declaration
public void AddSample(ref T item, MyTimeSpan sampleTimestamp)
Parameters
Type |
Name |
Description |
T |
item |
|
MyTimeSpan |
sampleTimestamp |
|
Clear()
Declaration
DiscardOld(MyTimeSpan)
Discards old samples, keeps at least 2 samples to be able to interpolate or extrapolate.
Declaration
public void DiscardOld(MyTimeSpan currentTimestamp)
Parameters
Interpolate(MyTimeSpan, out T)
Discards old frame (keeps one older) and interpolates between two samples using interpolator.
Returns interpolator
There must be at least one sample!
Declaration
public float Interpolate(MyTimeSpan currentTimestamp, out T result)
Parameters
Type |
Name |
Description |
MyTimeSpan |
currentTimestamp |
|
T |
result |
|
Returns
Type |
Description |
System.Single |
|