Navigation
API > API/Runtime > API/Runtime/HeadMountedDisplay
TCircularHistoryBuffer Modeled after TCircularBuffer/Queue, but resizable with it's own stack-style way of indexing (0 = most recent value added)
| Name | TCircularHistoryBuffer |
| Type | class |
| Header File | /Engine/Source/Runtime/HeadMountedDisplay/Public/MotionDelayBuffer.h |
| Include Path | #include "MotionDelayBuffer.h" |
Syntax
template<typename ElementType>
class TCircularHistoryBuffer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TCircularHistoryBuffer
(
uint32 InitialCapacity |
MotionDelayBuffer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsFull | bool | Allows us to recognize the difference between an empty buffer and one where Head has looped back to the start. | MotionDelayBuffer.h | |
| Elements | TArray< ElementType > | Holds the buffer's elements. | MotionDelayBuffer.h | |
| Head | uint32 | Index to the next slot to be filled. NOTE: The last element added is at Head-1. | MotionDelayBuffer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType & Add
(
const ElementType& Element |
MotionDelayBuffer.h | ||
uint32 Capacity() |
MotionDelayBuffer.h | ||
void Empty() |
MotionDelayBuffer.h | ||
void InsertAt
(
uint32 Index, |
MotionDelayBuffer.h | ||
bool IsEmpty() |
MotionDelayBuffer.h | ||
bool IsFull() |
MotionDelayBuffer.h | ||
int32 Num() |
MotionDelayBuffer.h | ||
void Resize
(
uint32 NewCapacity |
MotionDelayBuffer.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType & operator[]
(
uint32 Index |
NOTE: Will clamp to the oldest value available if the buffer isn't full and the index is larger than the number of values buffered. | MotionDelayBuffer.h | |
const ElementType & operator[]
(
uint32 Index |
MotionDelayBuffer.h |