Navigation
API > API/Runtime > API/Runtime/Chaos
A c-style array of objects with non-shipping bounds checking.
This behaves exactly like a C-style array, although it also keeps track of the number of elements in the array. This element count is artficial - all elements in the array are default constructed and will not be destructed until the array itself is destroyed.
the element type must have a default constructor
| Name | TCArray |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/CollisionResolutionTypes.h |
| Include Path | #include "Chaos/CollisionResolutionTypes.h" |
| Source | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/UncheckedArray.h |
Syntax
template<typename T, int32 N>
class TCArray
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TCArray () |
Chaos/Framework/UncheckedArray.h | ||
TCArray
(
int32 InNumElements |
Chaos/Framework/UncheckedArray.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | T | Chaos/Framework/UncheckedArray.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxElements | const int32 | Chaos/Framework/UncheckedArray.h | |
| SentinelValue | int32 | Chaos/Framework/UncheckedArray.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Elements | ElementType | Chaos/Framework/UncheckedArray.h | ||
| NumElements | int32 | NOTE: Element count before array for better cache behaviour. | Chaos/Framework/UncheckedArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Add
(
ElementType&& V |
Move the element to the end of the array. | Chaos/Framework/UncheckedArray.h | |
int32 Add
(
const ElementType& V |
Copy the element to the end of the array. | Chaos/Framework/UncheckedArray.h | |
int32 Add () |
Increase the size of the array without re-initializing the new element. | Chaos/Framework/UncheckedArray.h | |
int32 AddUninitialized() |
Increase the size of the array without re-initializing the new element. | Chaos/Framework/UncheckedArray.h | |
ElementType * begin () |
Chaos/Framework/UncheckedArray.h | ||
const ElementType * begin () |
Chaos/Framework/UncheckedArray.h | ||
int32 Emplace
(
ElementType&& V |
Move the element to the end of the array. | Chaos/Framework/UncheckedArray.h | |
void Empty() |
Set the number of elements to 0. | Chaos/Framework/UncheckedArray.h | |
const ElementType * end () |
Chaos/Framework/UncheckedArray.h | ||
ElementType * end () |
Chaos/Framework/UncheckedArray.h | ||
ElementType * GetData () |
Chaos/Framework/UncheckedArray.h | ||
const ElementType * GetData () |
Chaos/Framework/UncheckedArray.h | ||
bool IsEmpty() |
Chaos/Framework/UncheckedArray.h | ||
bool IsFull() |
Chaos/Framework/UncheckedArray.h | ||
int32 Max() |
Chaos/Framework/UncheckedArray.h | ||
int32 Num() |
Chaos/Framework/UncheckedArray.h | ||
void RemoveAt
(
const int32 Index |
Remove the element at the specified index Moves all higher elements down to fill the gap. | Chaos/Framework/UncheckedArray.h | |
void RemoveAtSwap
(
const int32 Index |
Remove the element at the specified index Moves the last element into the gap. | Chaos/Framework/UncheckedArray.h | |
void Reset() |
Set the number of elements to 0. | Chaos/Framework/UncheckedArray.h | |
void SetNum
(
const int32 InNum |
Set the number of elements in the array. | Chaos/Framework/UncheckedArray.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TCArray< T, N > MakeEmpty() |
Chaos/Framework/UncheckedArray.h | ||
static TCArray< T, N > MakeFull() |
Chaos/Framework/UncheckedArray.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType & operator[]
(
const int32 Index |
Chaos/Framework/UncheckedArray.h | ||
const ElementType & operator[]
(
const int32 Index |
Chaos/Framework/UncheckedArray.h |