UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ManagedArray.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3#include "Containers/Array.h"
9//
10#include "ChaosLog.h"
12#include "Chaos/BVHParticles.h"
13#include "Math/Vector.h"
14#include "Chaos/Matrix.h"
15#include "Templates/TypeHash.h"
16
18
19template <typename T>
24
25//Note: see TArray::BulkSerialize for requirements
27{
28 Array.BulkSerialize(Ar);
29}
30
32{
33 Array.BulkSerialize(Ar);
34}
35
37{
38 Array.BulkSerialize(Ar);
39}
40
42{
43 Array.BulkSerialize(Ar);
44}
45
47{
48 Array.BulkSerialize(Ar);
49}
50
52{
53 Array.BulkSerialize(Ar);
54}
55
57{
58 Array.BulkSerialize(Ar);
59}
60
62{
63 Array.BulkSerialize(Ar);
64}
65
67{
68 Array.BulkSerialize(Ar);
69}
70
72{
73 Array.BulkSerialize(Ar);
74}
75
77{
78 Array.BulkSerialize(Ar);
79}
80
82{
83 Array.BulkSerialize(Ar);
84}
85
86
87// --------------------------------------------------------------------------
88// utility functions to estimate the allocated size of managed arrays
89// --------------------------------------------------------------------------
91{
92 template<typename T>
93 inline SIZE_T GetAllocatedSize(const T& Value)
94 {
95 return sizeof(T);
96 }
97
98 template<typename T>
100 {
101 return Array.GetAllocatedSize();
102 }
103
104 template<typename T>
106 {
107 return Array.GetAllocatedSize();
108 }
109
110 template<typename T>
112 {
113 return Set.GetAllocatedSize();
114 }
115
116 template<typename T>
118 {
119 return Ptr ? ManagedArrayTypeSize::GetAllocatedSize(*Ptr) : 0;
120 }
121
122 template<typename T>
124 {
125 return Ptr ? ManagedArrayTypeSize::GetAllocatedSize(*Ptr) : 0;
126 }
127
128 template<typename T, ESPMode Mode>
130 {
131 return Ptr ? ManagedArrayTypeSize::GetAllocatedSize(*Ptr) : 0;
132 }
133
138
140 {
141 return BVHParticles.GetAllocatedSize();
142 }
143}
144
145
146/***
147* Managed Array Base
148*
149* The ManagedArrayBase allows a common base class for the
150* the template class ManagedArray<T>. (see ManagedArray)
151*
152*/
154{
156protected:
161 virtual void Resize(const int32 Num) {};
162
167 virtual void Reserve(const int32 Num) {};
168
173 virtual void Reorder(const TArray<int32>& NewOrder) = 0;
174
179 //todo: this should really assert, but material is currently relying on both faces and vertices
181
185 virtual void Init(const FManagedArrayBase& ) {};
186
190 virtual void Convert(const FManagedArrayBase&) { ensureMsgf(false, TEXT("Type change not supported")); /* This type has no conversion process defined*/ };
191
195 virtual void CopyRange(const FManagedArrayBase& ConstArray, int32 Start, int32 Stop, int32 Offset = 0) {};
196
200 virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) {};
201
205 virtual SIZE_T GetAllocatedSize() const { return 0; }
206
207public:
209 {
211 }
212
214
216 {
217 bIsDirty = false;
218 }
219
221 {
222 bIsDirty = true;
223 }
224
225 FORCEINLINE bool IsDirty() const
226 {
227 return bIsDirty;
228 }
229
230 //todo(ocohen): these should all be private with friend access to managed collection
231
233 virtual void ExchangeArrays(FManagedArrayBase& Src) = 0;
234
237 {
238 check(false);
239 }
240
242 virtual int32 Num() const
243 {
244 return 0;
245 };
246
248 virtual int32 Max() const
249 {
250 return 0;
251 };
252
255 {
256 check(false);
257 }
258
260 virtual size_t GetTypeSize() const
261 {
262 return 0;
263 }
264
270 virtual void Reindex(const TArray<int32> & Offsets, const int32 & FinalSize, const TArray<int32> & SortedDeletionList, const TSet<int32> & DeletionSet) { }
271
272#if 0 //not needed until per instance serialization
274 virtual void Swap(int32 Index1, int32 Index2) = 0;
275#endif
276
278 virtual void Empty()
279 {
280 check(false);
281 }
282private:
283 bool bIsDirty;
284};
285
286template <typename T>
288
289template <typename T>
291template <typename T>
293template <typename T>
295template <typename T>
296void CopyRangeHelper(TArray<T>& Target, const TManagedArrayBase<T>& Source, int32 Start, int32 Stop, int32 Offset);
297template <typename T>
299template <typename T>
301
302/***
303* Managed Array
304*
305* Restricts clients ability to resize the array external to the containing manager.
306*/
307template<class InElementType>
309{
310
311public:
312
314
321
329
334
344
352
354 {
355 // ryan - is it okay to check that the size matches?
356 ensureMsgf(Array.Num() == 0 || Array.Num() == Other.Num(), TEXT("TManagedArrayBase<T>::operator=(TArray<T>&&) : Invalid array size."));
358 return *this;
359 }
360
366 {}
367
368
369 virtual void RemoveElements(const TArray<int32>& SortedDeletionList) override
370 {
371 if (SortedDeletionList.Num() == 0)
372 {
373 return;
374 }
375
377 for (int32 ii = SortedDeletionList.Num()-1 ; ii > -1 ; --ii)
378 {
379 if (ii == 0)
380 {
382
383 }
384 else if (SortedDeletionList[ii] != (SortedDeletionList[ii - 1]+1)) // compare this and previous values to make sure the difference is only 1.
385 {
388 }
389 }
390
391 Array.Shrink();
392 }
393
397 virtual void Init(const FManagedArrayBase& NewArray) override
398 {
399 ensureMsgf(NewArray.GetTypeSize() == GetTypeSize(),TEXT("TManagedArrayBase<T>::Init : Invalid array types."));
402
403 Resize(Size);
405 }
406
407 virtual SIZE_T GetAllocatedSize() const override
408 {
410 }
411
415 virtual void CopyRange(const FManagedArrayBase& ConstArray, int32 Start, int32 Stop, int32 Offset = 0) override
416 {
417 ensureMsgf(ConstArray.GetTypeSize() == GetTypeSize(), TEXT("TManagedArrayBase<T>::Init : Invalid array types."));
418 if (ensureMsgf(Stop + Offset <= Array.Num(), TEXT("Error : Index out of bounds")))
419 {
422 }
423 }
424
428 void Fill(const ElementType& Value)
429 {
430 for (int32 Idx = 0; Idx < Array.Num(); ++Idx)
431 Array[Idx] = Value;
432 }
433
434#if 0
435 virtual void Swap(int32 Index1, int32 Index2) override
436 {
437 Exchange(Array[Index1], Array[Index2]);
438 }
439#endif
440
442 {
443 //It's up to the caller to make sure that the two arrays are of the same type
444 ensureMsgf(NewArray.GetTypeSize() == GetTypeSize(), TEXT("TManagedArrayBase<T>::Exchange : Invalid array types."));
446
447 Exchange(*this, NewTypedArray);
448 }
449
456 {
457 // @todo : optimization
458 // TArray->operator(Index) will perform checks against the
459 // the array. It might be worth implementing the memory
460 // management directly on the ManagedArray, to avoid the
461 // overhead of the TArray.
462 return Array[Index];
463 }
465 {
466 return Array[Index];
467 }
468
475 {
476 return Array;
477 }
478
480 {
481 return Array;
482 }
483
490 {
491 return Array.GetData();
492 }
493
500 {
501 return Array.GetData();
502 }
503
509 FORCEINLINE size_t GetTypeSize() const override
510 {
511 return sizeof(ElementType);
512 }
513
519 FORCEINLINE int32 Num() const override
520 {
521 return Array.Num();
522 }
523
524 FORCEINLINE int32 Max() const override
525 {
526 return Array.Max();
527 }
528
529 FORCEINLINE bool Contains(const ElementType& Item) const
530 {
531 return Array.Contains(Item);
532 }
533
537 int32 Find(const ElementType& Item) const
538 {
539 return Array.Find(Item);
540 }
541
545 int32 Count(const ElementType& Item) const
546 {
547 int32 Num = 0;
548 for (int32 Idx = 0; Idx < Array.Num(); ++Idx)
549 Num += Array[Idx] == Item ? 1 : 0;
550 return Num;
551 }
552
559 {
560 return Array.IsValidIndex(Index);
561 }
562
569 {
570 checkf((Index >= 0) & (Index < Array.Num()), TEXT("Array index out of bounds: %i from an array of size %i"), Index, Array.Num());
571 }
572
579 {
581 int Version = 1;
582 Ar << Version;
583
585 {
586 Ar << Array;
587 }
588 else
589 {
591 }
592 }
593
598 {
599 return GetArrayHash(Array.GetData(), Array.Num());
600 }
601
604
613
614protected:
620 void Resize(const int32 Size)
621 {
623 }
624
630 void Reserve(const int32 Size)
631 {
633 }
634
639 void Empty()
640 {
641 Array.Empty();
642 }
643
644 void Reorder(const TArray<int32>& NewOrder) override
645 {
646 const int32 NumElements = Num();
647 check(NewOrder.Num() == NumElements);
649 NewArray.AddDefaulted(NumElements);
650 for (int32 OriginalIdx = 0; OriginalIdx < NumElements; ++OriginalIdx)
651 {
653 }
655 }
656
658
659};
660
661template<class T>
662inline uint32 GetTypeHash(const TManagedArrayBase<T>& ManagedArray)
663{
664 return ManagedArray.GetTypeHash();
665}
666
667template <typename T>
669{
670 for (int32 Index = 0; Index < Size; Index++)
671 {
673 }
674}
675
676
677template <typename TSrc, typename TDst>
685
686template <typename T>
691
692template <typename T>
694{
695 for (int32 Index = 0; Index < Size; Index++)
696 {
697 if (NewTypedArray[Index])
698 {
700 }
701 }
702}
703
704template <typename T>
706{
707 for (int32 Sdx = Start, Tdx = Start + Offset; Sdx < Source.Num() && Tdx < Target.Num() && Sdx < Stop; Sdx++, Tdx++)
708 {
709 Target[Tdx] = Source[Sdx];
710 }
711}
712
713template <typename T>
715{
716 check(false);
717}
718
719template <typename T>
721{
722 for (int32 Sdx = Start, Tdx = Start+Offset; Sdx<Source.Num() && Tdx<Target.Num() && Sdx<Stop; Sdx++, Tdx++)
723 {
724 Target[Tdx] = Source[Sdx];
725 }
726}
727
728/***
729* BitArray Managed Array base
730*/
732{
733
734public:
735
738
740
744
749
751 {
752 // ryan - is it okay to check that the size matches?
753 ensureMsgf(Array.Num() == 0 || Array.Num() == Other.Num(), TEXT("FManagedBitArrayBase::operator=(TArray<T>&&) : Invalid array size."));
755 return *this;
756 }
757
759 {}
760
761 virtual void RemoveElements(const TArray<int32>& SortedDeletionList) override
762 {
763 if (SortedDeletionList.Num() == 0)
764 {
765 return;
766 }
767
768 // try to batch as many element as possible
770 for (int32 ii = SortedDeletionList.Num() - 1; ii > -1; --ii)
771 {
773 if (ii == 0)
774 {
776 }
777 else if (SortedDeletionList[ii] != (SortedDeletionList[ii - 1] + 1)) // compare this and previous values to make sure the difference is only 1.
778 {
781 }
782 }
783 }
784
788 virtual void Init(const FManagedArrayBase& NewArray) override
789 {
790 ensureMsgf(NewArray.GetTypeSize() == GetTypeSize(), TEXT("FManagedBitArrayBase::Init : Invalid array types."));
792
793 const int32 Size = TypedConstArray.Num();
794 Resize(Size);
795 for (int32 Index = 0; Index < Size; Index++)
796 {
798 }
799 }
800
801 virtual SIZE_T GetAllocatedSize() const override
802 {
803 return Array.GetAllocatedSize();
804 }
805
809 virtual void CopyRange(const FManagedArrayBase& ConstArray, int32 Start, int32 Stop, int32 Offset = 0) override
810 {
811 ensureMsgf(ConstArray.GetTypeSize() == GetTypeSize(), TEXT("TManagedArrayBase<T>::Init : Invalid array types."));
812 if (ensureMsgf(Stop + Offset <= Array.Num(), TEXT("Error : Index out of bounds")))
813 {
815 for (int32 Sdx = Start, Tdx = Start + Offset; Sdx < ConstArray.Num() && Tdx < Array.Num() && Sdx < Stop; Sdx++, Tdx++)
816 {
818 }
819 }
820 }
821
825 void Fill(const bool Value)
826 {
827 for (int32 Idx = 0; Idx < Array.Num(); ++Idx)
828 {
829 Array[Idx] = Value;
830 }
831 }
832
833 void Fill(const TArray<bool>& BoolArray)
834 {
835 check(BoolArray.Num() == Array.Num());
836 for (int32 Idx = 0; Idx < Array.Num(); Idx++)
837 {
838 Array[Idx] = BoolArray[Idx];
839 }
840 }
841
843 {
844 //It's up to the caller to make sure that the two arrays are of the same type
845 ensureMsgf(NewArray.GetTypeSize() == GetTypeSize(), TEXT("FManagedBitArrayBase::Exchange : Invalid array types."));
847
848 Exchange(*this, NewTypedArray);
849 }
850
857 {
858 return Array.IsValidIndex(Index);
859 }
860
867 {
868 // @todo : optimization
869 // TArray->operator(Index) will perform checks against the
870 // the array. It might be worth implementing the memory
871 // management directly on the ManagedArray, to avoid the
872 // overhead of the TArray.
873 return Array[Index];
874 }
876 {
877 return Array[Index];
878 }
879
886 {
887 return Array;
888 }
889
891 {
892 return Array;
893 }
894
900 {
901 TArray<bool> BoolArray;
902 BoolArray.SetNumUninitialized(Array.Num());
903 for (int32 Idx = 0; Idx < Array.Num(); Idx++)
904 {
905 BoolArray[Idx] = Array[Idx];
906 }
907 return BoolArray;
908 }
909
910
916 //FORCEINLINE ElementType* GetData()
917 //{
918 // return Array.GetData();
919 //}
920
926 //FORCEINLINE const ElementType* GetData() const
927 //{
928 // return Array.GetData();
929 //}
930
936 FORCEINLINE size_t GetTypeSize() const override
937 {
938 // this is not true but this ios the smallest we can represent
939 return 1;
940 }
941
947 FORCEINLINE int32 Num() const override
948 {
949 return Array.Num();
950 }
951
952 FORCEINLINE int32 Max() const override
953 {
954 return Array.Max();
955 }
956
957 FORCEINLINE bool Contains(const bool Item) const
958 {
959 return Array.Contains(Item);
960 }
961
965 int32 Find(const bool Item) const
966 {
967 return Array.Find(Item);
968 }
969
973 int32 Count(const bool Item) const
974 {
976 return (Item) ? NumSetBits : (Array.Num() - NumSetBits);
977 }
978
985 {
986 checkf((Index >= 0) & (Index < Array.Num()), TEXT("Array index out of bounds: %i from an array of size %i"), Index, Array.Num());
987 }
988
995 {
996 // we need to keep the backward compatibility with TManagedArray<bool> when it inherited from TManagedArrayBase<T>
998 int Version = 1;
999 Ar << Version;
1000
1001 // for now always go through a bool array, in the future we can have a more optimized path
1002 TArray<bool> BoolArray;
1003 if (Ar.IsSaving())
1004 {
1005 BoolArray = GetAsBoolArray();
1006 }
1008 {
1009 Ar << BoolArray;
1010 }
1011 else
1012 {
1013 TryBulkSerializeManagedArray(Ar, BoolArray);
1014 }
1015 if (Ar.IsLoading())
1016 {
1017 Resize(BoolArray.Num());
1018 Fill(BoolArray);
1019 }
1020
1021 }
1022protected:
1028 void Resize(const int32 Size)
1029 {
1030 if (Size > Array.Num())
1031 {
1032 Array.Add(false, Size - Array.Num());
1033 }
1034 else if (Size < Array.Num())
1035 {
1036 const int32 NumToRemove = (Array.Num() - Size);
1038 }
1039 }
1040
1046 void Reserve(const int32 Size)
1047 {
1049 }
1050
1055 void Empty()
1056 {
1057 Array.Empty();
1058 }
1059
1060 void Reorder(const TArray<int32>& NewOrder) override
1061 {
1062 const int32 NumElements = Num();
1063 check(NewOrder.Num() == NumElements);
1064 TBitArray<> NewArray(false, NumElements);
1065 for (int32 OriginalIdx = 0; OriginalIdx < NumElements; ++OriginalIdx)
1066 {
1068 }
1070 }
1071
1073};
1074
1075//
1076//
1077//
1078#define UNSUPPORTED_UNIQUE_ARRAY_COPIES(TYPE, NAME) \
1079template<> inline void InitHelper(TArray<TYPE>& Array, const TManagedArrayBase<TYPE>& NewTypedArray, int32 Size) { \
1080 UE_LOG(LogChaos,Warning, TEXT("Cannot make a copy of unique array of type (%s) within the managed array collection. Regenerate unique pointer attributes if needed."), NAME); }\
1081template<> inline void CopyRangeHelper(TArray<TYPE>& Target, const TManagedArrayBase<TYPE>& Source, int32 Start, int32 Stop, int32 Offset) {\
1082 UE_LOG(LogChaos, Warning, TEXT("Cannot make a range copy of unique array of type (%s) within the managed array collection. Regenerate unique pointer attributes if needed."), NAME); \
1083}
1084
1087
1090
1093
1096
1097template<class InElementType>
1127
1128template<>
1130{
1131public:
1133
1136
1140
1147
1149 {}
1150
1151 virtual void Reindex(const TArray<int32> & Offsets, const int32 & FinalSize, const TArray<int32> & SortedDeletionList, const TSet<int32>& DeletionSet) override
1152 {
1153 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<int32>[%p]::Reindex()"),this);
1154
1155 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1156 for (int32 Index = 0; Index < ArraySize; Index++)
1157 {
1158 int32 RemapVal = this->operator[](Index);
1159 if (0 <= RemapVal)
1160 {
1162 if (DeletionSet.Contains(this->operator[](Index)))
1163 {
1164 this->operator[](Index) = INDEX_NONE;
1165 }
1166 else
1167 {
1168 this->operator[](Index) -= Offsets[RemapVal];
1169 }
1170 ensure(-1 <= this->operator[](Index));
1171 }
1172 }
1173 }
1174
1176 {
1177 const int32 ArraySize = Num();
1178 for (int32 Index = 0; Index < ArraySize; ++Index)
1179 {
1180 int32& Mapping = this->operator[](Index);
1181 if (Mapping >= 0)
1182 {
1183 Mapping = InverseNewOrder[Mapping];
1184 }
1185 }
1186 }
1187
1188 virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
1189 {
1191 {
1192 for (uint32 Index = StartSize; Index < StartSize + NumElements; ++Index)
1193 {
1194 this->operator[](Index) = INDEX_NONE;
1195 }
1196 }
1197 }
1198};
1199
1200
1201template<>
1237
1238template<>
1240{
1241protected:
1245 virtual void Convert(const FManagedArrayBase& NewArray) override
1246 {
1247 check(NewArray.GetTypeSize() != GetTypeSize());
1248 check(NewArray.GetTypeSize() == sizeof(int32));
1249
1251 const int32 Size = NewTypedArray.Num();
1252 Resize(Size);
1253 for (int32 Index = 0; Index < Size; Index++)
1254 {
1256 }
1257 }
1258};
1259
1260template<>
1261class TManagedArray<TSet<int32>> : public TManagedArrayBase<TSet<int32>>
1262{
1263public:
1265
1268
1272
1279
1281 {}
1282
1283 virtual void Reindex(const TArray<int32> & Offsets, const int32 & FinalSize, const TArray<int32> & SortedDeletionList, const TSet<int32>& DeletionSet) override
1284 {
1285 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<TArray<int32>>[%p]::Reindex()"), this);
1286
1287 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1288
1289 for (int32 Index = 0; Index < ArraySize; Index++)
1290 {
1292
1294 {
1295 NewSet.Remove(Del);
1296 }
1297
1298 TSet<int32> OldSet = this->operator[](Index); //need a copy since we're modifying the entries in the set (can't edit in place because value desyncs from hash)
1299 NewSet.Reset(); //maybe we should remove
1300
1301 for (int32 StaleEntry : OldSet)
1302 {
1303 const int32 NewEntry = StaleEntry >= 0 ? StaleEntry - Offsets[StaleEntry] : StaleEntry; //only remap if valid
1304 NewSet.Add(NewEntry);
1305 }
1306 }
1307 }
1308
1309 virtual void ReindexFromLookup(const TArray<int32> & InverseNewOrder) override
1310 {
1311
1312 int32 ArraySize = Num();
1313
1314 for (int32 Index = 0; Index < ArraySize; Index++)
1315 {
1317 TSet<int32> OldSet = this->operator[](Index); //need a copy since we're modifying the entries in the set
1318 NewSet.Reset(); //maybe we should remove
1319
1320 for (int32 StaleEntry : OldSet)
1321 {
1322 const int32 NewEntry = StaleEntry >= 0 ? InverseNewOrder[StaleEntry] : StaleEntry; //only remap if valid
1323 NewSet.Add(NewEntry);
1324 }
1325 }
1326 }
1327};
1328
1329template<>
1330class TManagedArray<FIntVector> : public TManagedArrayBase<FIntVector>
1331{
1332public:
1334
1337
1341
1348
1350 {}
1351
1352 virtual void Reindex(const TArray<int32> & Offsets, const int32 & FinalSize, const TArray<int32> & SortedDeletionList, const TSet<int32>& DeletionSet) override
1353 {
1354 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1355 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1356 for (int32 Index = 0; Index < ArraySize; Index++)
1357 {
1358 const FIntVector & RemapVal = this->operator[](Index);
1359 for (int i = 0; i < 3; i++)
1360 {
1361 if (0 <= RemapVal[i])
1362 {
1363 ensure(RemapVal[i] < MaskSize);
1364 if (DeletionSet.Contains(this->operator[](Index)[i]))
1365 {
1366 this->operator[](Index)[i] = INDEX_NONE;
1367 }
1368 else
1369 {
1370 this->operator[](Index)[i] -= Offsets[RemapVal[i]];
1371 }
1372 ensure(-1 <= this->operator[](Index)[i] && this->operator[](Index)[i] <= FinalSize);
1373 }
1374 }
1375 }
1376 }
1377
1378 virtual void ReindexFromLookup(const TArray<int32> & InverseNewOrder) override
1379 {
1380 int32 ArraySize = Num();
1381 for (int32 Index = 0; Index < ArraySize; Index++)
1382 {
1384 for (int i = 0; i < 3; i++)
1385 {
1386 if (RemapVal[i] >= 0)
1387 {
1389 }
1390 }
1391 }
1392 }
1393
1394 virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
1395 {
1397 {
1398 for (uint32 Index = StartSize; Index < StartSize + NumElements; ++Index)
1399 {
1401 }
1402 }
1403 }
1404};
1405
1406template<>
1407class TManagedArray<FIntVector2> : public TManagedArrayBase<FIntVector2>
1408{
1409public:
1411
1414
1418
1425
1427 {}
1428
1429 virtual void Reindex(const TArray<int32>& Offsets, const int32& FinalSize, const TArray<int32>& SortedDeletionList, const TSet<int32>& DeletionSet) override
1430 {
1431 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1432 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1433 for (int32 Index = 0; Index < ArraySize; Index++)
1434 {
1435 const FIntVector2& RemapVal = this->operator[](Index);
1436 for (int i = 0; i < 2; i++)
1437 {
1438 if (0 <= RemapVal[i])
1439 {
1440 ensure(RemapVal[i] < MaskSize);
1441 if (DeletionSet.Contains(this->operator[](Index)[i]))
1442 {
1443 this->operator[](Index)[i] = INDEX_NONE;
1444 }
1445 else
1446 {
1447 this->operator[](Index)[i] -= Offsets[RemapVal[i]];
1448 }
1449 ensure(-1 <= this->operator[](Index)[i] && this->operator[](Index)[i] <= FinalSize);
1450 }
1451 }
1452 }
1453 }
1454
1456 {
1457 int32 ArraySize = Num();
1458 for (int32 Index = 0; Index < ArraySize; Index++)
1459 {
1461 for (int i = 0; i < 2; i++)
1462 {
1463 if (RemapVal[i] >= 0)
1464 {
1466 }
1467 }
1468 }
1469 }
1470
1471 virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
1472 {
1474 {
1475 for (uint32 Index = StartSize; Index < StartSize + NumElements; ++Index)
1476 {
1478 }
1479 }
1480 }
1481};
1482
1483template<>
1484class TManagedArray<TArray<FIntVector2>> : public TManagedArrayBase<TArray<FIntVector2>>
1485{
1486public:
1488
1491
1495
1502
1504 {}
1505
1506 virtual void Reindex(const TArray<int32>& Offsets, const int32& FinalSize, const TArray<int32>& SortedDeletionList, const TSet<int32>& DeletionSet) override
1507 {
1508 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1509 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1510 for (int32 Index = 0; Index < ArraySize; Index++)
1511 {
1513 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ArrayIndex++)
1514 {
1515 const FIntVector2& RemapVal = RemapValArray[ArrayIndex];
1516 for (int i = 0; i < 2; i++)
1517 {
1518 if (0 <= RemapVal[i])
1519 {
1520 ensure(RemapVal[i] < MaskSize);
1521 if (DeletionSet.Contains(this->operator[](Index)[ArrayIndex][i]))
1522 {
1523 this->operator[](Index)[ArrayIndex][i] = INDEX_NONE;
1524 }
1525 else
1526 {
1527 this->operator[](Index)[ArrayIndex][i] -= Offsets[RemapVal[i]];
1528 }
1529 ensure(-1 <= this->operator[](Index)[ArrayIndex][i] && this->operator[](Index)[ArrayIndex][i] <= FinalSize);
1530 }
1531 }
1532 }
1533 }
1534 }
1535
1537 {
1538 int32 ArraySize = Num();
1539 for (int32 Index = 0; Index < ArraySize; Index++)
1540 {
1542 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ArrayIndex++)
1543 {
1544 FIntVector2& RemapVal = RemapValArray[ArrayIndex];
1545 for (int i = 0; i < 2; i++)
1546 {
1547 if (RemapVal[i] >= 0)
1548 {
1550 }
1551 }
1552 }
1553 }
1554 }
1555};
1556
1557template<>
1558class TManagedArray<FIntVector4> : public TManagedArrayBase<FIntVector4>
1559{
1560public:
1562
1565
1569
1576
1578 {}
1579
1580 virtual void Reindex(const TArray<int32>& Offsets, const int32& FinalSize, const TArray<int32>& SortedDeletionList, const TSet<int32>& DeletionSet) override
1581 {
1582 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1583 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1584 for (int32 Index = 0; Index < ArraySize; Index++)
1585 {
1586 const FIntVector4& RemapVal = this->operator[](Index);
1587 for (int i = 0; i < 4; i++)
1588 {
1589 if (0 <= RemapVal[i])
1590 {
1591 ensure(RemapVal[i] < MaskSize);
1592 if (DeletionSet.Contains(this->operator[](Index)[i]))
1593 {
1594 this->operator[](Index)[i] = INDEX_NONE;
1595 }
1596 else
1597 {
1598 this->operator[](Index)[i] -= Offsets[RemapVal[i]];
1599 }
1600 ensure(-1 <= this->operator[](Index)[i] && this->operator[](Index)[i] <= FinalSize);
1601 }
1602 }
1603 }
1604 }
1605
1607 {
1608 int32 ArraySize = Num();
1609 for (int32 Index = 0; Index < ArraySize; Index++)
1610 {
1612 for (int i = 0; i < 4; i++)
1613 {
1614 if (RemapVal[i] >= 0)
1615 {
1617 }
1618 }
1619 }
1620 }
1621
1622 virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
1623 {
1625 {
1626 for (uint32 Index = StartSize; Index < StartSize + NumElements; ++Index)
1627 {
1629 }
1630 }
1631 }
1632};
1633
1634template<>
1635class TManagedArray<TArray<int32>> : public TManagedArrayBase<TArray<int32>>
1636{
1637public:
1639
1642
1646
1653
1655 {}
1656
1657 virtual void Reindex(const TArray<int32>& Offsets, const int32& FinalSize, const TArray<int32>& SortedDeletionList, const TSet<int32>& DeletionSet) override
1658 {
1659 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1660 int32 ArraySize = Num(), MaskSize = Offsets.Num();
1661 for (int32 Index = 0; Index < ArraySize; Index++)
1662 {
1664 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ArrayIndex++)
1665 {
1666 if (0 <= RemapValArray[ArrayIndex])
1667 {
1668 ensure(RemapValArray[ArrayIndex] < MaskSize);
1669 if (DeletionSet.Contains(this->operator[](Index)[ArrayIndex]))
1670 {
1671 this->operator[](Index)[ArrayIndex] = INDEX_NONE;
1672 }
1673 else
1674 {
1675 this->operator[](Index)[ArrayIndex] -= Offsets[RemapValArray[ArrayIndex]];
1676 }
1677 ensure(-1 <= this->operator[](Index)[ArrayIndex] && this->operator[](Index)[ArrayIndex] <= FinalSize);
1678 }
1679 }
1680 }
1681 }
1682
1684 {
1685 int32 ArraySize = Num();
1686 for (int32 Index = 0; Index < ArraySize; Index++)
1687 {
1689 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ArrayIndex++)
1690 {
1691 if (RemapValArray[ArrayIndex] >= 0)
1692 {
1693 RemapValArray[ArrayIndex] = InverseNewOrder[RemapValArray[ArrayIndex]];
1694 }
1695 }
1696 }
1697 }
1698};
1699
1700template<>
1701class TManagedArray<TArray<FIntVector3>> : public TManagedArrayBase<TArray<FIntVector3>>
1702{
1703public:
1705
1706 TManagedArray() = default;
1707
1711
1717
1719
1720 virtual ~TManagedArray() override = default;
1721
1722 virtual void Reindex(const TArray<int32>& Offsets, const int32& FinalSize, const TArray<int32>& SortedDeletionList, const TSet<int32>& DeletionSet) override
1723 {
1724 UE_LOG(LogChaos, VeryVerbose, TEXT("TManagedArray<FIntVector>[%p]::Reindex()"), this);
1725 const int32 ArraySize = Num();
1726 const int32 MaskSize = Offsets.Num();
1727 for (int32 Index = 0; Index < ArraySize; ++Index)
1728 {
1730 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ++ArrayIndex)
1731 {
1732 const FIntVector3& RemapVal = RemapValArray[ArrayIndex];
1733 for (int32 i = 0; i < FIntVector3::Num(); ++i)
1734 {
1735 if (0 <= RemapVal[i])
1736 {
1737 ensure(RemapVal[i] < MaskSize);
1738 if (DeletionSet.Contains(this->operator[](Index)[ArrayIndex][i]))
1739 {
1740 this->operator[](Index)[ArrayIndex][i] = INDEX_NONE;
1741 }
1742 else
1743 {
1744 this->operator[](Index)[ArrayIndex][i] -= Offsets[RemapVal[i]];
1745 }
1746 ensure(-1 <= this->operator[](Index)[ArrayIndex][i] && this->operator[](Index)[ArrayIndex][i] <= FinalSize);
1747 }
1748 }
1749 }
1750 }
1751 }
1752
1754 {
1755 const int32 ArraySize = Num();
1756 for (int32 Index = 0; Index < ArraySize; ++Index)
1757 {
1759 for (int32 ArrayIndex = 0; ArrayIndex < RemapValArray.Num(); ++ArrayIndex)
1760 {
1761 FIntVector3& RemapVal = RemapValArray[ArrayIndex];
1762 for (int32 i = 0; i < FIntVector3::Num(); ++i)
1763 {
1764 if (RemapVal[i] >= 0)
1765 {
1767 }
1768 }
1769 }
1770 }
1771 }
1772};
#define FORCEINLINE
Definition AndroidPlatform.h:140
#define check(expr)
Definition AssertionMacros.h:314
#define ensureMsgf( InExpression, InFormat,...)
Definition AssertionMacros.h:465
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define FORCEINLINE_DEBUGGABLE
Definition CoreMiscDefines.h:74
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_LOG(CategoryName, Verbosity, Format,...)
Definition LogMacros.h:270
void InitHelper(TArray< T > &Array, const TManagedArrayBase< T > &NewTypedArray, int32 Size)
Definition ManagedArray.h:668
TUniquePtr< TArray< UE::Math::TVector< float > > > LOCAL_MA_UniqueTArrayTVector
Definition ManagedArray.h:1094
TUniquePtr< Chaos::TPBDRigidParticle< Chaos::FReal, 3 > > LOCAL_MA_UniqueTPBDRigidParticle
Definition ManagedArray.h:1088
void TryBulkSerializeManagedArray(Chaos::FChaosArchive &Ar, TArray< T > &Array)
Definition ManagedArray.h:20
TUniquePtr< Chaos::FBVHParticles, TDefaultDelete< Chaos::FBVHParticles > > LOCAL_MA_UniqueTBVHParticles
Definition ManagedArray.h:1091
#define UNSUPPORTED_UNIQUE_ARRAY_COPIES(TYPE, NAME)
Definition ManagedArray.h:1078
void CopyRangeHelper(TArray< T > &Target, const TManagedArrayBase< T > &Source, int32 Start, int32 Stop, int32 Offset)
Definition ManagedArray.h:705
uint32 GetTypeHash(const TManagedArrayBase< T > &ManagedArray)
Definition ManagedArray.h:662
TUniquePtr< Chaos::TGeometryParticle< Chaos::FReal, 3 > > LOCAL_MA_UniqueTGeometryParticle
Definition ManagedArray.h:1085
UE::Math::TIntVector2< int32 > FIntVector2
Definition MathFwd.h:91
UE::Math::TIntVector4< int32 > FIntVector4
Definition MathFwd.h:93
FInt32Vector3 FIntVector
Definition MathFwd.h:115
const bool
Definition NetworkReplayStreaming.h:178
@ Stop
Definition PrecomputedVolumetricLightmapStreaming.cpp:26
uint32 GetArrayHash(const T *Ptr, uint64 Size, uint32 PreviousHash=0)
Definition TypeHash.h:200
UE_REWRITE constexpr void Exchange(T &A, T &B)
Definition UnrealTemplate.h:627
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Offset
Definition VulkanMemory.cpp:4033
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition BVHParticles.h:24
Definition ChaosArchive.h:167
Definition ImplicitObject.h:111
SIZE_T GetAllocatedSize() const
Definition Particles.h:189
virtual CORE_API void UsingCustomVersion(const struct FGuid &Guid)
Definition Archive.cpp:590
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
CORE_API int32 CustomVer(const struct FGuid &Key) const
Definition Archive.cpp:602
UE_FORCEINLINE_HINT bool IsSaving() const
Definition Archive.h:248
Definition BitArray.h:189
Definition BitArray.h:260
Definition ManagedArray.h:154
virtual void Init(const FManagedArrayBase &)
Definition ManagedArray.h:185
FORCEINLINE_DEBUGGABLE void MarkDirty()
Definition ManagedArray.h:220
virtual int32 Max() const
Definition ManagedArray.h:248
virtual ~FManagedArrayBase()
Definition ManagedArray.h:213
virtual void Serialize(Chaos::FChaosArchive &Ar)
Definition ManagedArray.h:254
virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency)
Definition ManagedArray.h:200
FORCEINLINE void ClearDirtyFlag()
Definition ManagedArray.h:215
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet)
Definition ManagedArray.h:270
FORCEINLINE bool IsDirty() const
Definition ManagedArray.h:225
virtual void Convert(const FManagedArrayBase &)
Definition ManagedArray.h:190
FManagedArrayBase()
Definition ManagedArray.h:208
virtual void CopyRange(const FManagedArrayBase &ConstArray, int32 Start, int32 Stop, int32 Offset=0)
Definition ManagedArray.h:195
virtual void Resize(const int32 Num)
Definition ManagedArray.h:161
virtual SIZE_T GetAllocatedSize() const
Definition ManagedArray.h:205
virtual void RemoveElements(const TArray< int32 > &SortedDeletionList)
Definition ManagedArray.h:236
virtual void ExchangeArrays(FManagedArrayBase &Src)=0
virtual size_t GetTypeSize() const
Definition ManagedArray.h:260
virtual int32 Num() const
Definition ManagedArray.h:242
virtual void Empty()
Definition ManagedArray.h:278
virtual void Reserve(const int32 Num)
Definition ManagedArray.h:167
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder)
Definition ManagedArray.h:180
virtual void Reorder(const TArray< int32 > &NewOrder)=0
Definition ManagedArray.h:732
FORCEINLINE bool IsValidIndex(int32 Index) const
Definition ManagedArray.h:856
void Reorder(const TArray< int32 > &NewOrder) override
Definition ManagedArray.h:1060
FORCEINLINE FManagedBitArrayBase(const FManagedBitArrayBase &Other)=delete
virtual void ExchangeArrays(FManagedArrayBase &NewArray) override
Definition ManagedArray.h:842
void Fill(const TArray< bool > &BoolArray)
Definition ManagedArray.h:833
void Resize(const int32 Size)
Definition ManagedArray.h:1028
FORCEINLINE FManagedBitArrayBase()
Definition ManagedArray.h:736
FORCEINLINE int32 Num() const override
Definition ManagedArray.h:947
TArray< bool > GetAsBoolArray() const
Definition ManagedArray.h:899
virtual void Serialize(Chaos::FChaosArchive &Ar)
Definition ManagedArray.h:994
FORCEINLINE bool Contains(const bool Item) const
Definition ManagedArray.h:957
int32 Find(const bool Item) const
Definition ManagedArray.h:965
void Fill(const bool Value)
Definition ManagedArray.h:825
FORCEINLINE FManagedBitArrayBase & operator=(TBitArray<> &&Other)
Definition ManagedArray.h:750
FORCEINLINE FManagedBitArrayBase & operator=(FManagedBitArrayBase &&Other)
Definition ManagedArray.h:745
FORCEINLINE FManagedBitArrayBase(FManagedBitArrayBase &&Other)
Definition ManagedArray.h:741
int32 Count(const bool Item) const
Definition ManagedArray.h:973
virtual SIZE_T GetAllocatedSize() const override
Definition ManagedArray.h:801
FORCEINLINE void RangeCheck(int32 Index) const
Definition ManagedArray.h:984
virtual ~FManagedBitArrayBase()
Definition ManagedArray.h:758
FORCEINLINE const TBitArray & GetConstArray()
Definition ManagedArray.h:885
FORCEINLINE size_t GetTypeSize() const override
Definition ManagedArray.h:936
void Reserve(const int32 Size)
Definition ManagedArray.h:1046
FORCEINLINE const FConstBitReference operator[](int Index) const
Definition ManagedArray.h:875
virtual void CopyRange(const FManagedArrayBase &ConstArray, int32 Start, int32 Stop, int32 Offset=0) override
Definition ManagedArray.h:809
FORCEINLINE int32 Max() const override
Definition ManagedArray.h:952
void Empty()
Definition ManagedArray.h:1055
TBitArray Array
Definition ManagedArray.h:1072
FORCEINLINE FBitReference operator[](int Index)
Definition ManagedArray.h:866
virtual void Init(const FManagedArrayBase &NewArray) override
Definition ManagedArray.h:788
virtual void RemoveElements(const TArray< int32 > &SortedDeletionList) override
Definition ManagedArray.h:761
FORCEINLINE const TBitArray & GetConstArray() const
Definition ManagedArray.h:890
Definition UnrealTemplate.h:321
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void RemoveAt(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2083
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
SizeType AddDefaulted()
Definition Array.h:2795
UE_REWRITE SizeType Max() const
Definition Array.h:1161
UE_NODEBUG UE_FORCEINLINE_HINT RangedForIteratorType end()
Definition Array.h:3391
bool Contains(const ComparisonType &Item) const
Definition Array.h:1518
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
UE_NODEBUG UE_FORCEINLINE_HINT bool IsValidIndex(SizeType Index) const
Definition Array.h:1122
UE_NODEBUG UE_FORCEINLINE_HINT RangedForIteratorType begin()
Definition Array.h:3389
UE_NODEBUG UE_FORCEINLINE_HINT bool Find(const ElementType &Item, SizeType &Index) const
Definition Array.h:1302
UE_FORCEINLINE_HINT void Shrink()
Definition Array.h:1278
void Empty(SizeType Slack=0)
Definition Array.h:2273
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
UE_FORCEINLINE_HINT int32 Num() const
Definition BitArray.h:1466
UE_FORCEINLINE_HINT bool IsValidIndex(int32 InIndex) const
Definition BitArray.h:1450
int32 Add(const bool Value)
Definition BitArray.h:615
void Empty(int32 ExpectedNumBits=0)
Definition BitArray.h:779
int32 Find(bool bValue) const
Definition BitArray.h:1084
UE_FORCEINLINE_HINT int32 Max() const
Definition BitArray.h:1467
uint32 GetAllocatedSize(void) const
Definition BitArray.h:1062
int32 CountSetBits(int32 FromIndex=0, int32 ToIndex=INDEX_NONE) const
Definition BitArray.h:1378
UE_FORCEINLINE_HINT bool Contains(bool bValue) const
Definition BitArray.h:1245
void Reserve(int32 Number)
Definition BitArray.h:800
void RemoveAt(int32 BaseIndex, int32 NumBitsToRemove=1)
Definition BitArray.h:1004
Definition ManagedArray.h:309
FORCEINLINE RangedForIteratorType begin()
Definition ManagedArray.h:609
void Reserve(const int32 Size)
Definition ManagedArray.h:630
virtual void RemoveElements(const TArray< int32 > &SortedDeletionList) override
Definition ManagedArray.h:369
FORCEINLINE int32 Num() const override
Definition ManagedArray.h:519
void Empty()
Definition ManagedArray.h:639
virtual void ExchangeArrays(FManagedArrayBase &NewArray) override
Definition ManagedArray.h:441
int32 Count(const ElementType &Item) const
Definition ManagedArray.h:545
FORCEINLINE RangedForIteratorType end()
Definition ManagedArray.h:611
FORCEINLINE void RangeCheck(int32 Index) const
Definition ManagedArray.h:568
TArray< InElementType > Array
Definition ManagedArray.h:657
virtual void CopyRange(const FManagedArrayBase &ConstArray, int32 Start, int32 Stop, int32 Offset=0) override
Definition ManagedArray.h:415
virtual ~TManagedArrayBase()
Definition ManagedArray.h:365
FORCEINLINE TManagedArrayBase & operator=(TManagedArrayBase< ElementType > &&Other)
Definition ManagedArray.h:348
void Fill(const ElementType &Value)
Definition ManagedArray.h:428
void Reorder(const TArray< int32 > &NewOrder) override
Definition ManagedArray.h:644
virtual void Init(const FManagedArrayBase &NewArray) override
Definition ManagedArray.h:397
FORCEINLINE RangedForConstIteratorType end() const
Definition ManagedArray.h:612
FORCEINLINE const TArray< ElementType > & GetConstArray()
Definition ManagedArray.h:474
FORCEINLINE size_t GetTypeSize() const override
Definition ManagedArray.h:509
virtual SIZE_T GetAllocatedSize() const override
Definition ManagedArray.h:407
virtual void Serialize(Chaos::FChaosArchive &Ar)
Definition ManagedArray.h:578
FORCEINLINE uint32 GetTypeHash() const
Definition ManagedArray.h:597
FORCEINLINE const ElementType & operator[](int Index) const
Definition ManagedArray.h:464
FORCEINLINE TManagedArrayBase(const TManagedArrayBase< ElementType > &Other)=delete
FORCEINLINE ElementType * GetData()
Definition ManagedArray.h:489
FORCEINLINE bool IsValidIndex(int32 Index) const
Definition ManagedArray.h:558
InElementType ElementType
Definition ManagedArray.h:313
FORCEINLINE const TArray< ElementType > & GetConstArray() const
Definition ManagedArray.h:479
FORCEINLINE const ElementType * GetData() const
Definition ManagedArray.h:499
FORCEINLINE ElementType & operator[](int Index)
Definition ManagedArray.h:455
FORCEINLINE TManagedArrayBase(TManagedArrayBase< ElementType > &&Other)
Definition ManagedArray.h:338
FORCEINLINE RangedForConstIteratorType begin() const
Definition ManagedArray.h:610
FORCEINLINE TManagedArrayBase & operator=(TArray< ElementType > &&Other)
Definition ManagedArray.h:353
FORCEINLINE TManagedArrayBase(TArray< ElementType > &&Other)
Definition ManagedArray.h:341
TArray< InElementType >::RangedForIteratorType RangedForIteratorType
Definition ManagedArray.h:602
FORCEINLINE int32 Max() const override
Definition ManagedArray.h:524
void Resize(const int32 Size)
Definition ManagedArray.h:620
int32 Find(const ElementType &Item) const
Definition ManagedArray.h:537
FORCEINLINE bool Contains(const ElementType &Item) const
Definition ManagedArray.h:529
TArray< InElementType >::RangedForConstIteratorType RangedForConstIteratorType
Definition ManagedArray.h:603
FORCEINLINE TManagedArrayBase()
Definition ManagedArray.h:319
FORCEINLINE TManagedArrayBase(const TArray< ElementType > &Other)
Definition ManagedArray.h:326
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1412
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1429
FORCEINLINE TManagedArray(TArray< FIntVector2 > &&Other)
Definition ManagedArray.h:1421
FORCEINLINE TManagedArray(const TArray< FIntVector2 > &Other)
Definition ManagedArray.h:1415
virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
Definition ManagedArray.h:1471
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1455
FORCEINLINE TManagedArray(TManagedArray< FIntVector2 > &&Other)=default
FORCEINLINE TManagedArray(const TManagedArray< FIntVector2 > &Other)=delete
virtual ~TManagedArray()
Definition ManagedArray.h:1426
FORCEINLINE TManagedArray & operator=(TManagedArray< FIntVector2 > &&Other)=default
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1580
FORCEINLINE TManagedArray & operator=(TManagedArray< FIntVector4 > &&Other)=default
FORCEINLINE TManagedArray(TArray< FIntVector4 > &&Other)
Definition ManagedArray.h:1572
FORCEINLINE TManagedArray(TManagedArray< FIntVector4 > &&Other)=default
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1563
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1606
FORCEINLINE TManagedArray(const TArray< FIntVector4 > &Other)
Definition ManagedArray.h:1566
FORCEINLINE TManagedArray(const TManagedArray< FIntVector4 > &Other)=delete
virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
Definition ManagedArray.h:1622
virtual ~TManagedArray()
Definition ManagedArray.h:1577
FORCEINLINE TManagedArray(const TArray< FIntVector > &Other)
Definition ManagedArray.h:1338
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1335
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1352
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1378
virtual ~TManagedArray()
Definition ManagedArray.h:1349
FORCEINLINE TManagedArray(const TManagedArray< FIntVector > &Other)=delete
FORCEINLINE TManagedArray(TManagedArray< FIntVector > &&Other)=default
FORCEINLINE TManagedArray(TArray< FIntVector > &&Other)
Definition ManagedArray.h:1344
FORCEINLINE TManagedArray & operator=(TManagedArray< FIntVector > &&Other)=default
virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
Definition ManagedArray.h:1394
FORCEINLINE TManagedArray(TArray< FTransform3f > &&Other)
Definition ManagedArray.h:1214
FORCEINLINE TManagedArray & operator=(TManagedArray< FTransform3f > &&Other)=default
virtual void Convert(const FManagedArrayBase &NewArray) override
Definition ManagedArray.h:1226
virtual ~TManagedArray()
Definition ManagedArray.h:1219
FORCEINLINE TManagedArray(TManagedArray< FTransform3f > &&Other)=default
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1205
FORCEINLINE TManagedArray(const TArray< FTransform3f > &Other)
Definition ManagedArray.h:1208
FORCEINLINE TManagedArray(const TManagedArray< FTransform3f > &Other)=delete
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1506
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1489
FORCEINLINE TManagedArray(TManagedArray< TArray< FIntVector2 > > &&Other)=default
virtual ~TManagedArray()
Definition ManagedArray.h:1503
FORCEINLINE TManagedArray & operator=(TManagedArray< TArray< FIntVector2 > > &&Other)=default
FORCEINLINE TManagedArray(TArray< TArray< FIntVector2 > > &&Other)
Definition ManagedArray.h:1498
FORCEINLINE TManagedArray(const TManagedArray< TArray< FIntVector2 > > &Other)=delete
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1536
FORCEINLINE TManagedArray(const TArray< TArray< FIntVector2 > > &Other)
Definition ManagedArray.h:1492
virtual ~TManagedArray() override=default
TManagedArray(const TArray< TArray< FIntVector3 > > &Other)
Definition ManagedArray.h:1708
TManagedArray(TManagedArray< TArray< FIntVector3 > > &&Other)=default
TManagedArray(const TManagedArray< TArray< FIntVector3 > > &Other)=delete
TManagedArray(TArray< TArray< FIntVector3 > > &&Other)
Definition ManagedArray.h:1714
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1753
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1722
TManagedArray & operator=(TManagedArray< TArray< FIntVector3 > > &&Other)=default
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1683
FORCEINLINE TManagedArray & operator=(TManagedArray< TArray< int32 > > &&Other)=default
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1640
FORCEINLINE TManagedArray(const TManagedArray< TArray< int32 > > &Other)=delete
FORCEINLINE TManagedArray(const TArray< TArray< int32 > > &Other)
Definition ManagedArray.h:1643
virtual ~TManagedArray()
Definition ManagedArray.h:1654
FORCEINLINE TManagedArray(TManagedArray< TArray< int32 > > &&Other)=default
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1657
FORCEINLINE TManagedArray(TArray< TArray< int32 > > &&Other)
Definition ManagedArray.h:1649
FORCEINLINE TManagedArray(const TManagedArray< TSet< int32 > > &Other)=delete
virtual ~TManagedArray()
Definition ManagedArray.h:1280
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1309
FORCEINLINE TManagedArray(const TArray< TSet< int32 > > &Other)
Definition ManagedArray.h:1269
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1266
FORCEINLINE TManagedArray(TArray< TSet< int32 > > &&Other)
Definition ManagedArray.h:1275
FORCEINLINE TManagedArray(TManagedArray< TSet< int32 > > &&Other)=default
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1283
FORCEINLINE TManagedArray & operator=(TManagedArray< TSet< int32 > > &&Other)=default
virtual void Convert(const FManagedArrayBase &NewArray) override
Definition ManagedArray.h:1245
FORCEINLINE TManagedArray & operator=(TManagedArray< int32 > &&Other)=default
virtual ~TManagedArray()
Definition ManagedArray.h:1148
FORCEINLINE TManagedArray(const TArray< int32 > &Other)
Definition ManagedArray.h:1137
virtual void ReindexFromLookup(const TArray< int32 > &InverseNewOrder) override
Definition ManagedArray.h:1175
FORCEINLINE TManagedArray(TArray< int32 > &&Other)
Definition ManagedArray.h:1143
FORCEINLINE TManagedArray(TManagedArray< int32 > &&Other)=default
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1134
FORCEINLINE TManagedArray(const TManagedArray< int32 > &Other)=delete
virtual void SetDefaults(uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency) override
Definition ManagedArray.h:1188
virtual void Reindex(const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet) override
Definition ManagedArray.h:1151
Definition ManagedArray.h:1099
FORCEINLINE TManagedArray(TManagedArray< InElementType > &&Other)
Definition ManagedArray.h:1108
FORCEINLINE TManagedArray & operator=(TManagedArray< InElementType > &&Other)
Definition ManagedArray.h:1116
FORCEINLINE TManagedArray(TArray< InElementType > &&Other)
Definition ManagedArray.h:1112
FORCEINLINE TManagedArray()
Definition ManagedArray.h:1101
FORCEINLINE TManagedArray(const TManagedArray< InElementType > &Other)=delete
FORCEINLINE TManagedArray(const TArray< InElementType > &Other)
Definition ManagedArray.h:1104
virtual ~TManagedArray()
Definition ManagedArray.h:1124
Definition RefCounting.h:454
Definition SharedPointer.h:692
Definition UniquePtr.h:107
FImplicitObject FImplicitObject3
Definition ImplicitFwd.h:27
Definition ManagedArray.h:91
SIZE_T GetAllocatedSize(const T &Value)
Definition ManagedArray.h:93
U16 Index
Definition radfft.cpp:71
CORE_API static const FGuid GUID
Definition DestructionObjectVersion.h:52
@ BulkSerializeArrays
Definition DestructionObjectVersion.h:37
Definition ManagedArrayCollection.h:56
Definition Array.h:206
static int32 Num()
Definition IntVector.h:603