6#include "Containers/Array.h"
9#include "Containers/Map.h"
82template <
typename AttributeType>
105 if (ElementCount > 0)
172 const FString
ItemStr = Item.ToString();
178template <
typename AttributeType>
186 AttributeType* Data =
Container.GetData() + StartIndex;
190 while (StartIndex < EndIndex)
192 new(Data) AttributeType(
Default);
199template <
typename AttributeType>
239 if constexpr (std::is_same_v<T, FTransform>)
248 Array.Container.BulkSerialize( Ar );
255 Ar <<
Array.Container;
276 Ar <<
Array.Container;
281 Array.Container.BulkSerialize( Ar );
354 template <
typename T>
393template <
typename AttributeType>
571template <
typename AttributeType>
800template <
typename T, SIZE_T N>
819template <
typename ElementIDType,
typename AttributeType>
822template <
typename ElementIDType,
typename AttributeType>
825template <
typename AttributeType>
828template <
typename AttributeType>
834template <
typename ElementIDType,
typename AttributeType>
854 : ArrayPtr(
InRef.ArrayPtr)
861 : ArrayPtr(
InRef.ArrayPtr)
872 : ArrayPtr(
InRef.ArrayPtr)
879 return static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementID.GetValue())[0];
886 return static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementID.GetValue())[0];
891 return static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementIndex)[0];
896 return static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementIndex)[0];
916 bool IsValid()
const {
return (ArrayPtr !=
nullptr); }
924 return static_cast<ArrayType*
>(ArrayPtr)->ArrayType::GetNumChannels();
930 return static_cast<ArrayType*
>(ArrayPtr)->ArrayType::GetNumChannels();
936 return ArrayPtr->GetNumElements();
949 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementID.GetValue())[0] =
Value;
956 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementID.GetValue())[0] =
Value;
961 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementIndex)[0] =
Value;
966 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementIndex)[0] =
Value;
972 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementIndex)[0] =
Value[0];
978 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementIndex)[0] =
Value[0];
987 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::SetNumChannels(NumChannels);
993 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::SetNumChannels(NumChannels);
999 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::InsertChannel(
Index);
1005 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::InsertChannel(Channel);
1011 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::RemoveChannel(
Index);
1017 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::RemoveChannel(Channel);
1024template <
typename ElementIDType,
typename AttributeType>
1038template <
typename ElementIDType,
typename AttributeType>
1060 : ArrayPtr(
InRef.ArrayPtr),
1061 Extent(
InRef.Extent)
1068 : ArrayPtr(
InRef.ArrayPtr),
1069 Extent(
InRef.Extent)
1080 : ArrayPtr(
InRef.ArrayPtr),
1081 Extent(
InRef.Extent)
1091 AttributeType* Element =
static_cast<BoundedArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementID.GetValue());
1096 return static_cast<UnboundedArrayType*
>(ArrayPtr)->GetArrayForChannel(0).Get(ElementID.GetValue());
1106 AttributeType* Element =
static_cast<BoundedArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementID.GetValue());
1111 return static_cast<UnboundedArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Get(ElementID.GetValue());
1119 AttributeType* Element =
static_cast<BoundedArrayType*
>(ArrayPtr)->GetArrayForChannel(0).GetElementBase(ElementIndex);
1124 return static_cast<UnboundedArrayType*
>(ArrayPtr)->GetArrayForChannel(0).Get(ElementIndex);
1132 AttributeType* Element =
static_cast<BoundedArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).GetElementBase(ElementIndex);
1137 return static_cast<UnboundedArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Get(ElementIndex);
1149 return static_cast<UnboundedArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Get(ElementIndex);
1163 AttributeType* Element =
static_cast<BoundedArrayType*
>(ArrayPtr)->GetArrayForChannel(ChannelIndex).GetElementBase(0);
1168 bool IsValid()
const {
return (ArrayPtr !=
nullptr); }
1176 return ArrayPtr->GetNumChannels();
1182 return ArrayPtr->GetNumChannels();
1188 return ArrayPtr->GetNumElements();
1257 ArrayPtr->SetNumChannels(NumChannels);
1263 ArrayPtr->SetNumChannels(NumChannels);
1269 ArrayPtr->InsertChannel(
Index);
1275 ArrayPtr->InsertChannel(Channel);
1281 ArrayPtr->RemoveChannel(
Index);
1287 ArrayPtr->RemoveChannel(Channel);
1295template <
typename ElementIDType,
typename AttributeType>
1299 check(Src.IsValid());
1300 check(Src.Extent == Extent);
1314template <
typename ElementIDType,
typename AttributeType>
1334 : ArrayPtr(
InRef.ArrayPtr)
1341 : ArrayPtr(
InRef.ArrayPtr)
1352 : ArrayPtr(
InRef.ArrayPtr)
1382 return Get(ElementIndex, Channel).ToArrayView();
1397 bool IsValid()
const {
return (ArrayPtr !=
nullptr); }
1405 return static_cast<ArrayType*
>(ArrayPtr)->ArrayType::GetNumChannels();
1411 return ArrayPtr->GetNumElements();
1421 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).Set(ElementID.GetValue(),
Value.ToArrayView());
1428 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Set(ElementID.GetValue(),
Value.ToArrayView());
1433 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).Set(ElementIndex,
Value.ToArrayView());
1438 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Set(ElementIndex,
Value.ToArrayView());
1443 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(0).Set(ElementIndex,
Value);
1448 static_cast<ArrayType*
>(ArrayPtr)->GetArrayForChannel(Channel).Set(ElementIndex,
Value);
1457 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::SetNumChannels(NumChannels);
1463 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::InsertChannel(
Index);
1469 static_cast<ArrayType*
>(ArrayPtr)->ArrayType::RemoveChannel(
Index);
1494 template <
typename AttributeType>
1512 : Ptr(
Other.Ptr ?
Other.Ptr->Clone() : nullptr)
1576 template <
typename T>
1578 const FName AttributeName,
1590 if ((*ArraySetPtr)->HasType<RealAttributeType>() && (*ArraySetPtr)->GetExtent() == Extent)
1593 (*ArraySetPtr)->SetFlags(
Flags);
1598 Map.Remove(AttributeName);
1612 template <
typename T,
1615 const FName AttributeName,
1629 template <
typename T,
1632 const FName AttributeName,
1646 template <
typename T,
1649 const FName AttributeName,
1661 Map.Remove(AttributeName);
1667 return Map.Contains(AttributeName);
1673 template <
typename T>
1680 return (*ArraySetPtr)->HasType<RealAttributeType>() &&
1718 template <
typename Allocator>
1750 return (*ArraySetPtr)->GetHash();
1804 template <
typename T>
1814 if ((*ArraySetPtr)->HasType<RealAttributeType>())
1827 template <
typename T>
1837 if ((*ArraySetPtr)->HasType<RealAttributeType>())
1856 template <
typename T>
1871template <
typename ElementIDType>
1894 template <
typename T>
1904 if ((*ArraySetPtr)->HasType<RealAttributeType>())
1918 template <
typename T>
1928 if ((*ArraySetPtr)->HasType<RealAttributeType>())
1942 UE_DEPRECATED(5.0,
"Please use GetAttributeChannelCount() instead.")
1953 return (*ArraySetPtr)->GetNumChannels();
1959 template <
typename AttributeType>
1960 UE_DEPRECATED(5.0,
"Please use GetAttributeChannelCount() instead.")
1965 if ((*ArraySetPtr)->HasType<AttributeType>())
1968 return static_cast<const ArrayType*
>(
ArraySetPtr->Get() )->ArrayType::GetNumChannels();
1975 UE_DEPRECATED(5.0,
"Please use SetAttributeChannelCount() instead.")
1986 (*ArraySetPtr)->SetNumChannels(NumChannels);
1990 template <
typename AttributeType>
1991 UE_DEPRECATED(5.0,
"Please use untemplated SetAttributeChannelCount() instead.")
1996 if ((*ArraySetPtr)->HasType<AttributeType>())
1999 static_cast<ArrayType*
>(
ArraySetPtr->Get())->ArrayType::SetNumChannels(NumIndices);
2004 UE_DEPRECATED(5.0,
"Please use InsertAttributeChannel() instead.")
2015 (*ArraySetPtr)->InsertChannel(
Index);
2019 template <
typename AttributeType>
2020 UE_DEPRECATED(5.0,
"Please use untemplated InsertAttributeIndexCount() instead.")
2025 if ((*ArraySetPtr)->HasType<AttributeType>())
2028 static_cast<ArrayType*
>(
ArraySetPtr->Get())->ArrayType::InsertChannel(
Index);
2033 UE_DEPRECATED(5.0,
"Please use RemoveAttributeChannel() instead.")
2044 (*ArraySetPtr)->RemoveChannel(
Index);
2048 template <
typename AttributeType>
2049 UE_DEPRECATED(5.0,
"Please use untemplated RemoveAttributeIndexCount() instead.")
2054 if ((*ArraySetPtr)->HasType<AttributeType>())
2057 static_cast<ArrayType*
>(
ArraySetPtr->Get())->ArrayType::RemoveChannel(
Index);
2066 template <
typename T>
2087 template <
typename T>
2108 this->
Insert(ElementID.GetValue());
2114 this->
Remove(ElementID.GetValue());
2183template <
typename FnType, u
int32 Size>
2186 template <
typename... T>
2197 template <
typename ElementIDType,
typename ForEachFunc>
2201 template <
typename ElementIDType,
typename ForEachFunc, u
int32 I>
2227template <
typename ElementIDType>
2228template <
typename ForEachFunc>
2246 template <
typename ElementIDType,
typename ForEachFunc>
2250 template <
typename ElementIDType,
typename ForEachFunc, u
int32 I>
2276template <
typename ElementIDType>
2277template <
typename ForEachFunc>
2294 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2306 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2318 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2330 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2342 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2354 template<
typename ElementIDType,
typename AttributeType,
typename ForEachFunc>
2366template <
typename ElementIDType>
2367template <
typename AttributeType,
typename ForEachFunc>
2376template <
typename ElementIDType>
2377template <
typename AttributeType,
typename ForEachFunc>
2424 Ptr = JumpTable.
Fns[Type](Extent);
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
typename TCopyQualifiersFromTo< From, To >::Type TCopyQualifiersFromTo_T
Definition CopyQualifiersFromTo.h:17
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
constexpr bool EnumHasAnyFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:35
constexpr bool EnumHasAllFlags(Enum Flags, Enum Contains)
Definition EnumClassFlags.h:28
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
typename UE4IntegerSequence_Private::TMakeIntegerSequenceImpl< T, N >::Type TMakeIntegerSequence
Definition IntegerSequence.h:31
UE::Math::TVector2< float > FVector2f
Definition MathFwd.h:74
UE::Math::TVector< float > FVector3f
Definition MathFwd.h:73
UE::Math::TVector4< float > FVector4f
Definition MathFwd.h:75
TEnableIf<!TIsBulkSerializable< T >::Value, FArchive >::Type & operator<<(FArchive &Ar, TMeshAttributeArrayBase< T > &Array)
Definition MeshAttributeArray.h:222
EMeshAttributeFlags
Definition MeshAttributeArray.h:292
const bool
Definition NetworkReplayStreaming.h:178
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
#define UE_LOGFMT(CategoryName, Verbosity, Format,...)
Definition StructuredLog.h:46
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
uint32 Size
Definition VulkanMemory.cpp:4034
Definition Archive.h:1208
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
CORE_API int32 CustomVer(const struct FGuid &Key) const
Definition Archive.cpp:602
virtual CORE_API const FCustomVersionContainer & GetCustomVersions() const
Definition Archive.cpp:546
Definition MeshAttributeArray.h:1557
void Insert(const int32 Index)
Definition MeshAttributeArray.h:1759
FAttributesSetBase()
Definition MeshAttributeArray.h:1560
TMeshAttributesArray< typename TMeshAttributesRegisterType< T >::RefType > RegisterAttribute(const FName AttributeName, const int32 NumberOfChannels=1, const T &Default=T(), const EMeshAttributeFlags Flags=EMeshAttributeFlags::None)
Definition MeshAttributeArray.h:1614
bool DoesAttributeHaveAnyFlags(const FName AttributeName, EMeshAttributeFlags AttributeFlags) const
Definition MeshAttributeArray.h:1725
TMap< FName, FAttributesSetEntry > Map
Definition MeshAttributeArray.h:1860
TMeshAttributesRef< int32, typename TMeshAttributesRefType< T >::RefType > GetAttributesRef(const FName AttributeName)
Definition MeshAttributeArray.h:1828
void Initialize(const int32 Count)
Definition MeshAttributeArray.h:1689
int32 GetNumElements() const
Definition MeshAttributeArray.h:1709
uint32 GetHash(const FName AttributeName) const
Definition MeshAttributeArray.h:1746
TMeshAttributesConstRef< int32, typename TMeshAttributesRefType< T >::ConstRefType > GetAttributesRef(const FName AttributeName) const
Definition MeshAttributeArray.h:1805
void Remap(const TSparseArray< int32 > &IndexRemap)
Definition MeshAttributeArray.cpp:112
void AppendAttributesFrom(const FAttributesSetBase &OtherAttributesSet)
Definition MeshAttributeArray.cpp:132
bool DoesAttributeHaveAllFlags(const FName AttributeName, EMeshAttributeFlags AttributeFlags) const
Definition MeshAttributeArray.h:1736
TMeshAttributesArray< typename TMeshAttributesRegisterType< T >::RefType > RegisterAttributeInternal(const FName AttributeName, const int32 NumberOfChannels=1, const typename TMeshAttributesRegisterType< T >::RealAttributeType &Default=typename TMeshAttributesRegisterType< T >::RealAttributeType(), const EMeshAttributeFlags Flags=EMeshAttributeFlags::None)
Definition MeshAttributeArray.h:1577
friend MESHDESCRIPTION_API FArchive & operator<<(FArchive &Ar, FAttributesSetBase &AttributesSet)
Definition MeshAttributeArray.cpp:56
TMeshAttributesArray< typename TMeshAttributesRegisterType< T >::RefType > RegisterIndexAttribute(const FName AttributeName, const int32 NumberOfChannels=1, const EMeshAttributeFlags Flags=EMeshAttributeFlags::None)
Definition MeshAttributeArray.h:1648
TMeshAttributesArray< typename TMeshAttributesRegisterType< T >::RefType > RegisterAttribute(const FName AttributeName, const int32 NumberOfChannels=1, const typename TMeshAttributesRegisterType< T >::RealAttributeType &Default=typename TMeshAttributesRegisterType< T >::RealAttributeType(), const EMeshAttributeFlags Flags=EMeshAttributeFlags::None)
Definition MeshAttributeArray.h:1631
int32 NumElements
Definition MeshAttributeArray.h:1863
friend void SerializeLegacy(FArchive &Ar, FAttributesSetBase &AttributesSet)
Definition MeshAttributeArray.cpp:41
void Remove(const int32 Index)
Definition MeshAttributeArray.h:1792
void GetAttributeNames(TArray< FName, Allocator > &OutAttributeNames) const
Definition MeshAttributeArray.h:1719
bool HasAttribute(const FName AttributeName) const
Definition MeshAttributeArray.h:1665
bool HasAttributeOfType(const FName AttributeName) const
Definition MeshAttributeArray.h:1674
void UnregisterAttribute(const FName AttributeName)
Definition MeshAttributeArray.h:1659
void SetNumElements(const int32 Count)
Definition MeshAttributeArray.h:1699
Definition MeshAttributeArray.h:1483
FAttributesSetEntry(FAttributesSetEntry &&)=default
friend FArchive & operator<<(FArchive &Ar, FAttributesSetEntry &Entry)
Definition MeshAttributeArray.cpp:9
FAttributesSetEntry & operator=(const FAttributesSetEntry &Other)
Definition MeshAttributeArray.h:1519
const FMeshAttributeArraySetBase * Get() const
Definition MeshAttributeArray.h:1530
FAttributesSetEntry()=default
const FMeshAttributeArraySetBase * operator->() const
Definition MeshAttributeArray.h:1531
void CreateArrayOfType(const uint32 Type, const uint32 Extent)
Definition MeshAttributeArray.h:2421
FAttributesSetEntry(const int32 NumberOfChannels, const AttributeType &Default, const EMeshAttributeFlags Flags, const int32 NumElements, const int32 Extent)
Definition MeshAttributeArray.h:1495
FAttributesSetEntry(const FAttributesSetEntry &Other)
Definition MeshAttributeArray.h:1511
FAttributesSetEntry & operator=(FAttributesSetEntry &&)=default
FMeshAttributeArraySetBase * Get()
Definition MeshAttributeArray.h:1533
FMeshAttributeArraySetBase & operator*()
Definition MeshAttributeArray.h:1535
~FAttributesSetEntry()=default
FMeshAttributeArraySetBase * operator->()
Definition MeshAttributeArray.h:1534
const FMeshAttributeArraySetBase & operator*() const
Definition MeshAttributeArray.h:1532
bool operator!() const
Definition MeshAttributeArray.h:1539
CORE_API const FCustomVersion * GetVersion(FGuid CustomKey) const
Definition CustomVersion.cpp:365
Definition MeshAttributeArray.h:318
virtual void Serialize(FArchive &Ar)=0
virtual void Remap(const TSparseArray< int32 > &IndexRemap)=0
uint32 GetExtent() const
Definition MeshAttributeArray.h:364
uint32 GetType() const
Definition MeshAttributeArray.h:361
virtual ~FMeshAttributeArraySetBase()=default
virtual void SetNumIndices(const int32 NumIndices)=0
int32 GetNumElements() const
Definition MeshAttributeArray.h:373
void SetFlags(const EMeshAttributeFlags InFlags)
Definition MeshAttributeArray.h:370
virtual void Insert(const int32 Index)=0
virtual int32 GetNumChannels() const =0
EMeshAttributeFlags Flags
Definition MeshAttributeArray.h:386
FMeshAttributeArraySetBase(const uint32 InType, const EMeshAttributeFlags InFlags, const int32 InNumberOfElements, const uint32 InExtent)
Definition MeshAttributeArray.h:321
virtual int32 GetNumIndices() const =0
virtual void InsertIndex(const int32 Index)=0
virtual void Initialize(const int32 Count)=0
virtual void InsertChannel(const int32 Index)=0
virtual void SetNumChannels(const int32 NumChannels)=0
virtual void SetNumElements(const int32 Count)=0
virtual TUniquePtr< FMeshAttributeArraySetBase > Clone() const =0
virtual void RemoveChannel(const int32 Index)=0
int32 NumElements
Definition MeshAttributeArray.h:383
virtual uint32 GetHash() const =0
uint32 Type
Definition MeshAttributeArray.h:377
EMeshAttributeFlags GetFlags() const
Definition MeshAttributeArray.h:367
virtual void Remove(const int32 Index)=0
uint32 Extent
Definition MeshAttributeArray.h:380
virtual void RemoveIndex(const int32 Index)=0
bool HasType() const
Definition MeshAttributeArray.h:355
Definition NameTypes.h:617
Definition AttributeArrayContainer.h:393
Definition ArrayView.h:139
UE_FORCEINLINE_HINT constexpr SizeType Num() const
Definition ArrayView.h:380
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void Reset(SizeType NewSize=0)
Definition Array.h:2246
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
Definition AttributeArrayContainer.h:12
void Initialize(const int32 ElementCount, const AttributeType &Default)
Definition AttributeArrayContainer.h:24
Definition MeshAttributeArray.h:1873
void ForEach(ForEachFunc Func)
Definition MeshAttributeArray.h:2229
void ForEachByType(ForEachFunc Func)
Definition MeshAttributeArray.h:2368
void SetAttributeChannelCount(const FName AttributeName, const int32 NumChannels)
Definition MeshAttributeArray.h:1982
void InsertAttributeChannel(const FName AttributeName, const int32 Index)
Definition MeshAttributeArray.h:2011
TMeshAttributesRef< ElementIDType, typename TMeshAttributesRefType< T >::RefType > GetAttributesRef(const FName AttributeName)
Definition MeshAttributeArray.h:1919
TMeshAttributesConstRef< ElementIDType, typename TMeshAttributesRefType< T >::ConstRefType > GetAttributesRef(const FName AttributeName) const
Definition MeshAttributeArray.h:1895
void SetAttribute(const ElementIDType ElementID, const FName AttributeName, const int32 AttributeChannel, const T &AttributeValue)
Definition MeshAttributeArray.h:2088
void RemoveAttributeIndex(const FName AttributeName, const int32 Index)
Definition MeshAttributeArray.h:2034
void RemoveAttributeChannel(const FName AttributeName, const int32 Index)
Definition MeshAttributeArray.h:2040
void Remove(const ElementIDType ElementID)
Definition MeshAttributeArray.h:2112
void InsertAttributeIndex(const FName AttributeName, const int32 Index)
Definition MeshAttributeArray.h:2005
int32 GetAttributeIndexCount(const FName AttributeName) const
Definition MeshAttributeArray.h:1943
int32 GetAttributeChannelCount(const FName AttributeName) const
Definition MeshAttributeArray.h:1949
T GetAttribute(const ElementIDType ElementID, const FName AttributeName, const int32 AttributeChannel=0) const
Definition MeshAttributeArray.h:2067
void Insert(const ElementIDType ElementID)
Definition MeshAttributeArray.h:2106
void SetAttributeIndexCount(const FName AttributeName, const int32 NumChannels)
Definition MeshAttributeArray.h:1976
Definition UnrealString.h.inl:34
Definition MeshAttributeArray.h:84
uint32 Extent
Definition MeshAttributeArray.h:162
const AttributeType * GetElementBase(const int32 Index) const
Definition MeshAttributeArray.h:152
void Remap(const TSparseArray< int32 > &IndexRemap, const AttributeType &Default)
Definition MeshAttributeArray.h:200
void Initialize(const int32 ElementCount, const AttributeType &Default)
Definition MeshAttributeArray.h:102
uint32 GetHash(uint32 Crc=0) const
Definition MeshAttributeArray.h:125
uint32 GetExtent() const
Definition MeshAttributeArray.h:155
const AttributeType * GetData() const
Definition MeshAttributeArray.h:99
void Insert(const int32 Index, const AttributeType &Default)
Definition MeshAttributeArray.h:179
TMeshAttributeArrayBase(uint32 InExtent=1)
Definition MeshAttributeArray.h:86
AttributeType * GetElementBase(const int32 Index)
Definition MeshAttributeArray.h:153
int32 Num() const
Definition MeshAttributeArray.h:95
void SetNum(const int32 ElementCount, const AttributeType &Default)
Definition MeshAttributeArray.h:111
TArray< AttributeType > Container
Definition MeshAttributeArray.h:159
void SetToDefault(const int32 Index, const AttributeType &Default)
Definition MeshAttributeArray.h:134
friend TEnableIf<!TIsBulkSerializable< T >::Value, FArchive >::Type & operator<<(FArchive &Ar, TMeshAttributeArrayBase< T > &Array)
Definition MeshAttributeArray.h:222
Definition MeshAttributeArray.h:395
virtual void SetNumChannels(const int32 NumChannels) override
Definition MeshAttributeArray.h:495
virtual void SetNumIndices(const int32 NumIndices) override
Definition MeshAttributeArray.h:492
virtual void SetNumElements(const int32 Count) override
Definition MeshAttributeArray.h:450
const TMeshAttributeArrayBase< AttributeType > & GetArrayForIndex(const int32 Index) const
Definition MeshAttributeArray.h:537
const TMeshAttributeArrayBase< AttributeType > & GetArrayForChannel(const int32 Index) const
Definition MeshAttributeArray.h:542
virtual void Remove(const int32 Index) override
Definition MeshAttributeArray.h:431
virtual void InsertIndex(const int32 Index) override
Definition MeshAttributeArray.h:511
AttributeType DefaultValue
Definition MeshAttributeArray.h:564
virtual int32 GetNumIndices() const override
Definition MeshAttributeArray.h:486
TMeshAttributeArraySet(const int32 NumberOfChannels, const AttributeType &InDefaultValue, const EMeshAttributeFlags InFlags, const int32 InNumberOfElements, const uint32 Extent)
Definition MeshAttributeArray.h:406
virtual void RemoveIndex(const int32 Index) override
Definition MeshAttributeArray.h:524
virtual void Remap(const TSparseArray< int32 > &IndexRemap) override
Definition MeshAttributeArray.h:476
virtual uint32 GetHash() const override
Definition MeshAttributeArray.h:459
virtual int32 GetNumChannels() const override
Definition MeshAttributeArray.h:489
virtual void RemoveChannel(const int32 Index) override
Definition MeshAttributeArray.h:530
virtual void Serialize(FArchive &Ar) override
Definition MeshAttributeArray.h:470
virtual void Initialize(const int32 Count) override
Definition MeshAttributeArray.h:440
TArray< TMeshAttributeArrayBase< AttributeType >, TInlineAllocator< 1 > > ArrayForChannels
Definition MeshAttributeArray.h:561
TMeshAttributeArrayBase< AttributeType > & GetArrayForChannel(const int32 Index)
Definition MeshAttributeArray.h:543
virtual void InsertChannel(const int32 Index) override
Definition MeshAttributeArray.h:517
friend FArchive & operator<<(FArchive &Ar, TMeshAttributeArraySet &AttributeArraySet)
Definition MeshAttributeArray.h:549
virtual void Insert(const int32 Index) override
Definition MeshAttributeArray.h:420
AttributeType GetDefaultValue() const
Definition MeshAttributeArray.h:546
virtual TUniquePtr< FMeshAttributeArraySetBase > Clone() const override
Definition MeshAttributeArray.h:414
TMeshAttributeArraySet(const int32 Extent=1)
Definition MeshAttributeArray.h:402
void Set(const ElementIDType ElementID, const int32 Channel, TArrayAttribute< const AttributeType > Value) const
Definition MeshAttributeArray.h:1426
void RemoveChannel(const int32 Index) const
Definition MeshAttributeArray.h:1467
int32 GetNumElements() const
Definition MeshAttributeArray.h:1409
TArrayAttribute< AttributeType > Get(const ElementIDType ElementID, const int32 Channel=0) const
Definition MeshAttributeArray.h:1365
TMeshAttributesRef(const TMeshAttributesRef< int32, TArrayAttribute< SrcAttributeType > > &InRef)
Definition MeshAttributeArray.h:1351
TArrayAttribute< AttributeType > operator[](int32 ElementIndex) const
Definition MeshAttributeArray.h:1370
TCopyQualifiersFromTo_T< AttributeType, FMeshAttributeArraySetBase > BaseArrayType
Definition MeshAttributeArray.h:1320
void SetArrayView(int32 ElementIndex, const int32 Channel, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1446
bool IsValid() const
Definition MeshAttributeArray.h:1397
TCopyQualifiersFromTo_T< AttributeType, TMeshUnboundedAttributeArraySet< std::remove_cv_t< AttributeType > > > ArrayType
Definition MeshAttributeArray.h:1321
void Set(int32 ElementIndex, const int32 Channel, TArrayAttribute< const AttributeType > Value) const
Definition MeshAttributeArray.h:1436
void SetNumChannels(const int32 NumChannels) const
Definition MeshAttributeArray.h:1455
void Set(int32 ElementIndex, TArrayAttribute< const AttributeType > Value) const
Definition MeshAttributeArray.h:1431
TMeshAttributesRef(const TMeshAttributesRef< ElementIDType, TArrayAttribute< SrcAttributeType > > &InRef)
Definition MeshAttributeArray.h:1333
void InsertChannel(const int32 Index) const
Definition MeshAttributeArray.h:1461
void Set(const ElementIDType ElementID, TArrayAttribute< const AttributeType > Value) const
Definition MeshAttributeArray.h:1419
AttributeType GetDefaultValue() const
Definition MeshAttributeArray.h:1400
TArrayAttribute< AttributeType > Get(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:1375
TMeshAttributesRef(const TMeshAttributesRef< int32, TArrayAttribute< AttributeType > > &InRef)
Definition MeshAttributeArray.h:1340
void Copy(TMeshAttributesConstRef< ElementIDType, TArrayAttribute< AttributeType > > Src, const int32 DestChannel=0, const int32 SrcChannel=0)
void SetArrayView(int32 ElementIndex, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1441
TMeshAttributesRef(BaseArrayType *InArrayPtr=nullptr, uint32 InExtent=0)
Definition MeshAttributeArray.h:1324
EMeshAttributeFlags GetFlags() const
Definition MeshAttributeArray.h:1415
TArrayView< AttributeType > GetArrayView(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:1380
int32 GetNumChannels() const
Definition MeshAttributeArray.h:1403
const TAttributeArrayContainer< AttributeType > * GetRawArray(const int32 AttributeChannel=0) const
Definition MeshAttributeArray.h:1386
TArrayAttribute< AttributeType > operator[](const ElementIDType ElementID) const
Definition MeshAttributeArray.h:1358
TArrayView< AttributeType > GetArrayView(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:1141
TArrayView< AttributeType > GetRawArray(const int32 ChannelIndex=0) const
Definition MeshAttributeArray.h:1153
TCopyQualifiersFromTo_T< AttributeType, TMeshUnboundedAttributeArraySet< std::remove_cv_t< AttributeType > > > UnboundedArrayType
Definition MeshAttributeArray.h:1046
void Set(const ElementIDType ElementID, const int32 Channel, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1211
TMeshAttributesRef(const TMeshAttributesRef< ElementIDType, TArrayView< SrcAttributeType > > &InRef)
Definition MeshAttributeArray.h:1059
TMeshAttributesRef(const TMeshAttributesRef< int32, TArrayView< SrcAttributeType > > &InRef)
Definition MeshAttributeArray.h:1079
void SetArrayView(int32 ElementIndex, const int32 Channel, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1246
TArrayView< AttributeType > Get(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:1128
void RemoveChannel(const int32 Channel) const
Definition MeshAttributeArray.h:1285
int32 GetNumElements() const
Definition MeshAttributeArray.h:1186
void Set(const ElementIDType ElementID, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1199
TArrayView< AttributeType > Get(const ElementIDType ElementID, const int32 Channel=0) const
Definition MeshAttributeArray.h:1102
void Set(int32 ElementIndex, const int32 Channel, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1231
uint32 GetExtent() const
Definition MeshAttributeArray.h:1195
int32 GetNumChannels() const
Definition MeshAttributeArray.h:1180
void SetArrayView(int32 ElementIndex, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1241
EMeshAttributeFlags GetFlags() const
Definition MeshAttributeArray.h:1192
TCopyQualifiersFromTo_T< AttributeType, TMeshAttributeArraySet< std::remove_cv_t< AttributeType > > > BoundedArrayType
Definition MeshAttributeArray.h:1045
TMeshAttributesRef(BaseArrayType *InArrayPtr=nullptr, uint32 InExtent=1)
Definition MeshAttributeArray.h:1049
AttributeType GetDefaultValue() const
Definition MeshAttributeArray.h:1171
TCopyQualifiersFromTo_T< AttributeType, FMeshAttributeArraySetBase > BaseArrayType
Definition MeshAttributeArray.h:1044
bool IsValid() const
Definition MeshAttributeArray.h:1168
void SetNumChannels(const int32 NumChannels) const
Definition MeshAttributeArray.h:1261
TMeshAttributesRef(const TMeshAttributesRef< int32, TArrayView< AttributeType > > &InRef)
Definition MeshAttributeArray.h:1067
void InsertChannel(const int32 Channel) const
Definition MeshAttributeArray.h:1273
TArrayView< AttributeType > operator[](int32 ElementIndex) const
Definition MeshAttributeArray.h:1115
TArrayView< AttributeType > operator[](const ElementIDType ElementID) const
Definition MeshAttributeArray.h:1087
void Set(int32 ElementIndex, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:1221
Definition MeshAttributeArray.h:836
TCopyQualifiersFromTo_T< AttributeType, TMeshAttributeArraySet< std::remove_cv_t< AttributeType > > > ArrayType
Definition MeshAttributeArray.h:841
void SetArrayView(int32 ElementIndex, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:969
void SetArrayView(int32 ElementIndex, const int32 Channel, TArrayView< const AttributeType > Value) const
Definition MeshAttributeArray.h:975
AttributeType & operator[](const ElementIDType ElementID) const
Definition MeshAttributeArray.h:877
AttributeType Get(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:894
void SetNumIndices(const int32 NumChannels) const
Definition MeshAttributeArray.h:985
TArrayView< AttributeType > GetRawArray(const int32 AttributeChannel=0) const
Definition MeshAttributeArray.h:904
TCopyQualifiersFromTo_T< AttributeType, FMeshAttributeArraySetBase > BaseArrayType
Definition MeshAttributeArray.h:840
EMeshAttributeFlags GetFlags() const
Definition MeshAttributeArray.h:940
AttributeType & operator[](int32 ElementIndex) const
Definition MeshAttributeArray.h:889
int32 GetNumChannels() const
Definition MeshAttributeArray.h:928
void Set(int32 ElementIndex, const int32 Channel, const AttributeType &Value) const
Definition MeshAttributeArray.h:964
TMeshAttributesRef(const TMeshAttributesRef< int32, AttributeType > &InRef)
Definition MeshAttributeArray.h:860
TArrayView< AttributeType > GetArrayView(int32 ElementIndex, const int32 Channel=0) const
Definition MeshAttributeArray.h:899
void SetNumChannels(const int32 NumChannels) const
Definition MeshAttributeArray.h:991
void InsertIndex(const int32 Index) const
Definition MeshAttributeArray.h:997
int32 GetNumElements() const
Definition MeshAttributeArray.h:934
TMeshAttributesRef(const TMeshAttributesRef< ElementIDType, SrcAttributeType > &InRef)
Definition MeshAttributeArray.h:853
AttributeType Get(const ElementIDType ElementID, const int32 Channel=0) const
Definition MeshAttributeArray.h:884
TMeshAttributesRef(BaseArrayType *InArrayPtr=nullptr, uint32 InExtent=1)
Definition MeshAttributeArray.h:844
void InsertChannel(const int32 Channel) const
Definition MeshAttributeArray.h:1003
TMeshAttributesRef(const TMeshAttributesRef< int32, SrcAttributeType > &InRef)
Definition MeshAttributeArray.h:871
uint32 GetExtent() const
Definition MeshAttributeArray.h:943
AttributeType GetDefaultValue() const
Definition MeshAttributeArray.h:919
void Copy(TMeshAttributesRef< ElementIDType, const AttributeType > Src, const int32 DestChannel=0, const int32 SrcChannel=0)
Definition MeshAttributeArray.h:1025
void Set(const ElementIDType ElementID, const AttributeType &Value) const
Definition MeshAttributeArray.h:947
void RemoveChannel(const int32 Channel) const
Definition MeshAttributeArray.h:1015
bool IsValid() const
Definition MeshAttributeArray.h:916
void RemoveIndex(const int32 Index) const
Definition MeshAttributeArray.h:1009
void Set(int32 ElementIndex, const AttributeType &Value) const
Definition MeshAttributeArray.h:959
int32 GetNumIndices() const
Definition MeshAttributeArray.h:922
void Set(const ElementIDType ElementID, const int32 Channel, const AttributeType &Value) const
Definition MeshAttributeArray.h:954
Definition MeshAttributeArray.h:573
virtual uint32 GetHash() const override
Definition MeshAttributeArray.h:635
virtual void SetNumIndices(const int32 NumIndices) override
Definition MeshAttributeArray.h:668
virtual void Remap(const TSparseArray< int32 > &IndexRemap) override
Definition MeshAttributeArray.h:652
TMeshUnboundedAttributeArraySet(const int32 NumberOfChannels, const AttributeType &InDefaultValue, const EMeshAttributeFlags InFlags, const int32 InNumberOfElements)
Definition MeshAttributeArray.h:582
virtual void SetNumElements(const int32 Count) override
Definition MeshAttributeArray.h:626
virtual void InsertIndex(const int32 Index) override
Definition MeshAttributeArray.h:687
friend FArchive & operator<<(FArchive &Ar, TMeshUnboundedAttributeArraySet &AttributeArraySet)
Definition MeshAttributeArray.h:719
virtual void Serialize(FArchive &Ar) override
Definition MeshAttributeArray.h:646
const TAttributeArrayContainer< AttributeType > & GetArrayForChannel(const int32 Index) const
Definition MeshAttributeArray.h:712
TArray< TAttributeArrayContainer< AttributeType >, TInlineAllocator< 1 > > ArrayForChannels
Definition MeshAttributeArray.h:731
TMeshUnboundedAttributeArraySet()
Definition MeshAttributeArray.h:578
virtual void Insert(const int32 Index) override
Definition MeshAttributeArray.h:596
AttributeType GetDefaultValue() const
Definition MeshAttributeArray.h:716
virtual int32 GetNumChannels() const override
Definition MeshAttributeArray.h:665
virtual void Remove(const int32 Index) override
Definition MeshAttributeArray.h:607
AttributeType DefaultValue
Definition MeshAttributeArray.h:734
virtual int32 GetNumIndices() const override
Definition MeshAttributeArray.h:662
TAttributeArrayContainer< AttributeType > & GetArrayForChannel(const int32 Index)
Definition MeshAttributeArray.h:713
virtual void Initialize(const int32 Count) override
Definition MeshAttributeArray.h:616
virtual TUniquePtr< FMeshAttributeArraySetBase > Clone() const override
Definition MeshAttributeArray.h:590
virtual void SetNumChannels(const int32 NumChannels) override
Definition MeshAttributeArray.h:671
virtual void RemoveChannel(const int32 Index) override
Definition MeshAttributeArray.h:706
virtual void RemoveIndex(const int32 Index) override
Definition MeshAttributeArray.h:700
virtual void InsertChannel(const int32 Index) override
Definition MeshAttributeArray.h:693
Definition ContainerAllocationPolicies.h:894
Definition SparseArray.h:1137
Definition SparseArray.h:524
void Insert(int32 Index, typename TTypeTraits< ElementType >::ConstInitType Element)
Definition SparseArray.h:644
Definition UniquePtr.h:107
bool IsValid() const
Definition UniquePtr.h:280
UE_FORCEINLINE_HINT T * Get() const
Definition UniquePtr.h:324
Definition MeshAttributeArray.h:2394
TJumpTable< TUniquePtr< FMeshAttributeArraySetBase >(uint32), TTupleArity< AttributeTypes >::Value > JumpTableType
Definition MeshAttributeArray.h:2396
Definition MeshAttributeArray.h:2293
Definition MeshAttributeArray.h:2244
Definition MeshAttributeArray.h:2195
U16 Index
Definition radfft.cpp:71
static UE_FORCEINLINE_HINT uint32 MemCrc32(const void *Data, int32 Length, uint32 CRC=0)
Definition Crc.h:31
Definition CustomVersion.h:40
Definition MeshTypes.h:22
CORE_API static const FGuid GUID
Definition FortniteMainBranchObjectVersion.h:21
CORE_API static const FGuid GUID
Definition ReleaseObjectVersion.h:154
@ MeshDescriptionNewSerialization
Definition ReleaseObjectVersion.h:66
@ MeshDescriptionNewFormat
Definition ReleaseObjectVersion.h:107
CORE_API static const FGuid GUID
Definition UE5MainStreamObjectVersion.h:22
void operator()(FName Name, ForEachFunc Fn, const FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2357
void operator()(FName Name, ForEachFunc Fn, const FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2345
Definition MeshAttributeArray.h:2332
void operator()(FName Name, ForEachFunc Fn, const FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2333
void operator()(FName Name, ForEachFunc Fn, FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2321
void operator()(FName Name, ForEachFunc Fn, FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2309
Definition MeshAttributeArray.h:2296
void operator()(FName Name, ForEachFunc Fn, FMeshAttributeArraySetBase *Attributes)
Definition MeshAttributeArray.h:2297
Definition IntegerSequence.h:9
Definition MeshAttributeArray.h:70
static const bool Value
Definition MeshAttributeArray.h:70
Definition MeshAttributeArray.h:2185
FnType * Fns[Size]
Definition MeshAttributeArray.h:2189
constexpr TJumpTable(T... Ts)
Definition MeshAttributeArray.h:2187
Definition MeshAttributeArray.h:750
std::conditional_t< TIsDerivedFrom< AttributeType, FElementID >::Value, int32, AttributeType > RealAttributeType
Definition MeshAttributeArray.h:752
T AttributeType
Definition MeshAttributeArray.h:751
Definition MeshAttributeArray.h:757
const T ConstRefType
Definition MeshAttributeArray.h:761
std::remove_cv_t< T > NonConstRefType
Definition MeshAttributeArray.h:762
static const uint32 MinExpectedExtent
Definition MeshAttributeArray.h:758
T RefType
Definition MeshAttributeArray.h:760
static const uint32 MaxExpectedExtent
Definition MeshAttributeArray.h:759
Definition MeshAttributeArray.h:796
static const uint32 Extent
Definition MeshAttributeArray.h:797
Definition MeshAttributeArray.h:62
void Type
Definition Tuple.h:598