Space Engineers
Classes | Public Member Functions | Properties | List of all members
VRage.Library.Utils.MyInterpolationQueue< T > Class Template Reference

Public Member Functions

 MyInterpolationQueue (int defaultCapacity, InterpolationHandler< T > interpolator)
 
void DiscardOld (MyTimeSpan currentTimestamp)
 Discards old samples, keeps at least 2 samples to be able to interpolate or extrapolate. More...
 
void Clear ()
 
void AddSample (ref T item, MyTimeSpan sampleTimestamp)
 Adds sample with timestamp, it must be larger than last timestamp! More...
 
float Interpolate (MyTimeSpan currentTimestamp, out T result)
 Discards old frame (keeps one older) and interpolates between two samples using interpolator. Returns interpolator There must be at least one sample! More...
 

Properties

MyTimeSpan LastSample [get]
 
int Count [get]
 

Detailed Description

Definition at line 12 of file MyInterpolationQueue.cs.

Constructor & Destructor Documentation

VRage.Library.Utils.MyInterpolationQueue< T >.MyInterpolationQueue ( int  defaultCapacity,
InterpolationHandler< T >  interpolator 
)
inline

Definition at line 40 of file MyInterpolationQueue.cs.

Member Function Documentation

void VRage.Library.Utils.MyInterpolationQueue< T >.AddSample ( ref T  item,
MyTimeSpan  sampleTimestamp 
)
inline

Adds sample with timestamp, it must be larger than last timestamp!

Definition at line 76 of file MyInterpolationQueue.cs.

void VRage.Library.Utils.MyInterpolationQueue< T >.Clear ( )
inline

Definition at line 67 of file MyInterpolationQueue.cs.

void VRage.Library.Utils.MyInterpolationQueue< T >.DiscardOld ( MyTimeSpan  currentTimestamp)
inline

Discards old samples, keeps at least 2 samples to be able to interpolate or extrapolate.

Definition at line 49 of file MyInterpolationQueue.cs.

float VRage.Library.Utils.MyInterpolationQueue< T >.Interpolate ( MyTimeSpan  currentTimestamp,
out T  result 
)
inline

Discards old frame (keeps one older) and interpolates between two samples using interpolator. Returns interpolator There must be at least one sample!

Definition at line 100 of file MyInterpolationQueue.cs.

Property Documentation

Definition at line 36 of file MyInterpolationQueue.cs.

Definition at line 31 of file MyInterpolationQueue.cs.


The documentation for this class was generated from the following file: