RingBuffer
(
capacity
, defaultValue
)
|
Allocates and initialises the buffer.
Signature
Oculus.Interaction.RingBuffer< T >.RingBuffer(int capacity, T defaultValue) Parameters capacity: int
The length of the buffer
defaultValue: T
The initialisation value
|
this[int index]
: T
[Get] |
summary> Gets the element at a specified offset from the current head of the buffer.
It's useful for looking ahead or behind the buffer without altering its state. /summary>
Signature
T Oculus.Interaction.RingBuffer< T >.this[int index] |
Add
(
item
)
|
Inserts a value in the next entry of the buffer.
It overwrites the value already present there.
Signature
void Oculus.Interaction.RingBuffer< T >.Add(T item) Parameters item: T
The value to set
Returns void
The element at the specified index in the buffer.
|
Clear
(
clearValue
)
|
Initialises the buffer setting all values to the clear value.
Signature
void Oculus.Interaction.RingBuffer< T >.Clear(T clearValue) Parameters clearValue: T
The value to set in all entries
Returns void |
Peek
(
offset
)
|
Signature
T Oculus.Interaction.RingBuffer< T >.Peek(int offset=0) Parameters offset: intReturns T |