Tanoda
|
A ring buffer of Quaternions with a Delta() function that computes the buffer's average change over time as an angle-axis vector. Returns Vector3.zero if the buffer contains one or fewer samples. More...
Public Member Functions | |
DeltaQuaternionBuffer (int bufferSize) | |
override Vector3 | Delta () |
Returns the average angular velocity of Quaternions in the buffer as an angle-axis vector, or zero if the buffer is empty. More... | |
![]() | |
DeltaBuffer (int bufferSize) | |
DeltaBuffer (int bufferSize) | |
void | Clear () |
void | Add (SampleType sample, float sampleTime) |
SampleType | Get (int idx) |
SampleType | GetLatest () |
void | Set (int idx, SampleType sample, float sampleTime) |
void | SetLatest (SampleType sample, float sampleTime) |
float | GetTime (int idx) |
float | GetLatestTime () |
abstract DerivativeType | Delta () |
Returns the average change between each sample per unit time. More... | |
override Vector3 | Delta () |
Returns the average change between each sample per unit time, or zero if the buffer contains one or fewer elements. More... | |
IndexableEnumerator< SampleType > | GetEnumerator () |
![]() | |
DeltaBuffer (int bufferSize) | |
DeltaBuffer (int bufferSize) | |
void | Clear () |
void | Add (SampleType sample, float sampleTime) |
SampleType | Get (int idx) |
SampleType | GetLatest () |
void | Set (int idx, SampleType sample, float sampleTime) |
void | SetLatest (SampleType sample, float sampleTime) |
float | GetTime (int idx) |
float | GetLatestTime () |
abstract DerivativeType | Delta () |
Returns the average change between each sample per unit time. More... | |
override Vector3 | Delta () |
Returns the average change between each sample per unit time, or zero if the buffer contains one or fewer elements. More... | |
IndexableEnumerator< SampleType > | GetEnumerator () |
Additional Inherited Members | |
![]() | |
RingBuffer< ValueTimePair > | _buffer |
![]() | |
RingBuffer< ValueTimePair > | _buffer |
![]() | |
int | Count [get] |
bool | IsFull [get] |
bool | IsEmpty [get] |
int | Capacity [get] |
SampleType | this[int idx] [get] |
![]() | |
int | Count [get] |
bool | IsFull [get] |
bool | IsEmpty [get] |
int | Capacity [get] |
SampleType | this[int idx] [get] |
A ring buffer of Quaternions with a Delta() function that computes the buffer's average change over time as an angle-axis vector. Returns Vector3.zero if the buffer contains one or fewer samples.
The larger the buffer, the more stable but also delayed the resulting average change over time. A buffer size of 5 is a good start for 60-90 Hz updates.
Definition at line 168 of file DeltaBuffer.cs.
Leap.Unity.DeltaQuaternionBuffer.DeltaQuaternionBuffer | ( | int | bufferSize | ) |
Definition at line 170 of file DeltaBuffer.cs.
|
virtual |
Returns the average angular velocity of Quaternions in the buffer as an angle-axis vector, or zero if the buffer is empty.
Implements Leap.Unity.DeltaBuffer< Quaternion, Vector3 >.
Definition at line 176 of file DeltaBuffer.cs.