6#include "Containers/Map.h"
11#include "GeometryCollectionISMPoolComponent.generated.h"
348UCLASS(meta = (BlueprintSpawnableComponent), MinimalAPI)
354 using FMeshGroupId =
int32;
355 using FMeshId =
int32;
378 UE_DEPRECATED(5.3, "BatchUpdateInstancesTransforms
Array parameter version is deprecated, use the
TArrayView version
instead")
397 uint32 NextMeshGroupId = 0;
EUpdateTransformFlags
Definition ActorComponent.h:95
#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
ELevelTick
Definition EngineBaseTypes.h:70
ETeleportType
Definition EngineTypes.h:2401
uint32 GetTypeHash(const FISMComponentDescription &Desc)
Definition GeometryCollectionISMPoolComponent.h:144
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
constexpr uint32 HashCombineFast(uint32 A, uint32 B)
Definition TypeHash.h:74
uint32 GetArrayHash(const T *Ptr, uint64 Size, uint32 PreviousHash=0)
Definition TypeHash.h:200
Definition NameTypes.h:617
Definition UnrealType.h:3087
Definition ArrayView.h:139
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT ElementType * GetData() UE_LIFETIMEBOUND
Definition Array.h:1027
UE_FORCEINLINE_HINT void RemoveAtSwap(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2185
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
void Empty(SizeType Slack=0)
Definition Array.h:2273
Definition UnrealString.h.inl:34
Definition InstancedStaticMeshComponent.h:158
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition EngineBaseTypes.h:571
Definition GeometryCollectionISMPoolComponent.h:280
PRAGMA_ENABLE_DEPRECATION_WARNINGS void UpdateAbsoluteTransforms(const FTransform &BaseTransform, EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport)
Definition GeometryCollectionISMPoolComponent.cpp:551
PRAGMA_DISABLE_DEPRECATION_WARNINGS FISMIndex GetOrAddISM(UGeometryCollectionISMPoolComponent *OwningComponent, const FGeometryCollectionStaticMeshInstance &MeshInstance, bool &bOutISMCreated)
Definition GeometryCollectionISMPoolComponent.cpp:273
PRAGMA_ENABLE_DEPRECATION_WARNINGS void RemoveISM(FISMIndex ISMIndex, bool bKeepAlive, bool bRecycle)
Definition GeometryCollectionISMPoolComponent.cpp:446
int32 FISMIndex
Definition GeometryCollectionISMPoolComponent.h:281
TArray< int32 > FreeListISM
Definition GeometryCollectionISMPoolComponent.h:331
bool bCachedRecycle
Definition GeometryCollectionISMPoolComponent.h:335
PRAGMA_DISABLE_DEPRECATION_WARNINGS FGeometryCollectionMeshInfo AddInstancesToISM(UGeometryCollectionISMPoolComponent *OwningComponent, const FGeometryCollectionStaticMeshInstance &MeshInstance, int32 InstanceCount, TArrayView< const float > CustomDataFloats)
Definition GeometryCollectionISMPoolComponent.cpp:310
PRAGMA_ENABLE_DEPRECATION_WARNINGS void RequestPreallocateMeshInstance(const FGeometryCollectionStaticMeshInstance &MeshInstances)
Definition GeometryCollectionISMPoolComponent.cpp:493
TArray< int32 > FreeList
Definition GeometryCollectionISMPoolComponent.h:329
void BatchUpdateInstanceCustomData(FGeometryCollectionMeshInfo const &MeshInfo, int32 CustomFloatIndex, float CustomFloatValue)
Definition GeometryCollectionISMPoolComponent.cpp:378
PRAGMA_DISABLE_DEPRECATION_WARNINGS void ProcessPreallocationRequests(UGeometryCollectionISMPoolComponent *OwningComponent, int32 MaxPreallocations)
Definition GeometryCollectionISMPoolComponent.cpp:525
TSet< FGeometryCollectionStaticMeshInstance > PrellocationQueue
Definition GeometryCollectionISMPoolComponent.h:326
PRAGMA_ENABLE_DEPRECATION_WARNINGS void RemoveInstancesFromISM(const FGeometryCollectionMeshInfo &MeshInfo)
Definition GeometryCollectionISMPoolComponent.cpp:402
TArray< FGeometryCollectionISM > ISMs
Definition GeometryCollectionISMPoolComponent.h:321
bool bDisableBoundsAndTransformUpdate
Definition GeometryCollectionISMPoolComponent.h:338
TMap< FGeometryCollectionStaticMeshInstance, FISMIndex > MeshToISMIndex
Definition GeometryCollectionISMPoolComponent.h:323
bool bCachedKeepAlive
Definition GeometryCollectionISMPoolComponent.h:334
FGeometryCollectionISMPool()
Definition GeometryCollectionISMPoolComponent.cpp:266
bool BatchUpdateInstancesTransforms(FGeometryCollectionMeshInfo &MeshInfo, int32 StartInstanceIndex, TArrayView< const FTransform > NewInstancesTransforms, bool bWorldSpace, bool bMarkRenderStateDirty, bool bTeleport, bool bAllowPerInstanceRemoval)
Definition GeometryCollectionISMPoolComponent.cpp:320
void Clear()
Definition GeometryCollectionISMPoolComponent.cpp:474
Definition GeometryCollectionISMPoolComponent.h:260
void InitISM(const FGeometryCollectionStaticMeshInstance &InMeshInstance, bool bKeepAlive, bool bOverrideTransformUpdates=false)
Definition GeometryCollectionISMPoolComponent.cpp:132
TArray< FPrimitiveInstanceId > InstanceIds
Definition GeometryCollectionISMPoolComponent.h:275
void CreateISM(USceneComponent *InOwningComponent)
Definition GeometryCollectionISMPoolComponent.cpp:107
FInstanceGroups InstanceGroups
Definition GeometryCollectionISMPoolComponent.h:273
FInstanceGroups::FInstanceGroupId AddInstanceGroup(int32 InstanceCount, TArrayView< const float > CustomDataFloats)
Definition GeometryCollectionISMPoolComponent.cpp:229
TObjectPtr< UInstancedStaticMeshComponent > ISMComponent
Definition GeometryCollectionISMPoolComponent.h:271
FGeometryCollectionStaticMeshInstance MeshInstance
Definition GeometryCollectionISMPoolComponent.h:269
Definition GeometryCollectionISMPoolComponent.h:239
FMeshId AddMesh(const FGeometryCollectionStaticMeshInstance &MeshInstance, int32 InstanceCount, const FGeometryCollectionMeshInfo &ISMInstanceInfo, TArrayView< const float > CustomDataFloats)
Definition GeometryCollectionISMPoolComponent.cpp:67
bool BatchUpdateInstancesTransforms(FGeometryCollectionISMPool &ISMPool, FMeshId MeshId, int32 StartInstanceIndex, TArrayView< const FTransform > NewInstancesTransforms, bool bWorldSpace, bool bMarkRenderStateDirty, bool bTeleport)
Definition GeometryCollectionISMPoolComponent.cpp:80
TArray< FGeometryCollectionMeshInfo > MeshInfos
Definition GeometryCollectionISMPoolComponent.h:252
void RemoveAllMeshes(FGeometryCollectionISMPool &ISMPool)
Definition GeometryCollectionISMPoolComponent.cpp:98
int32 FMeshId
Definition GeometryCollectionISMPoolComponent.h:240
bool bAllowPerInstanceRemoval
Definition GeometryCollectionISMPoolComponent.h:255
void BatchUpdateInstanceCustomData(FGeometryCollectionISMPool &ISMPool, int32 CustomFloatIndex, float CustomFloatValue)
Definition GeometryCollectionISMPoolComponent.cpp:90
Definition GeometryCollectionISMPoolComponent.h:223
int32 ISMIndex
Definition GeometryCollectionISMPoolComponent.h:224
FInstanceGroups::FInstanceGroupId InstanceGroupIndex
Definition GeometryCollectionISMPoolComponent.h:225
TArrayView< const float > CustomDataSlice(int32 InstanceIndex, int32 NumCustomDataFloatsPerInstance)
Definition GeometryCollectionISMPoolComponent.cpp:61
TArray< float > CustomData
Definition GeometryCollectionISMPoolComponent.h:227
void ShadowCopyCustomData(int32 InstanceCount, int32 NumCustomDataFloatsPerInstance, TArrayView< const float > CustomDataFloats)
Definition GeometryCollectionISMPoolComponent.cpp:50
Definition GeometryCollectionISMPoolComponent.h:162
bool operator==(const FGeometryCollectionStaticMeshInstance &Other) const
Definition GeometryCollectionISMPoolComponent.h:168
FISMComponentDescription Desc
Definition GeometryCollectionISMPoolComponent.h:166
TArray< float > CustomPrimitiveData
Definition GeometryCollectionISMPoolComponent.h:165
TWeakObjectPtr< UStaticMesh > StaticMesh
Definition GeometryCollectionISMPoolComponent.h:163
TArray< TWeakObjectPtr< UMaterialInterface > > MaterialsOverrides
Definition GeometryCollectionISMPoolComponent.h:164
Definition GeometryCollectionISMPoolComponent.h:102
int32 StartCullDistance
Definition GeometryCollectionISMPoolComponent.h:121
float LodScale
Definition GeometryCollectionISMPoolComponent.h:125
int32 NumCustomDataFloats
Definition GeometryCollectionISMPoolComponent.h:119
bool operator==(const FISMComponentDescription &Other) const
Definition GeometryCollectionISMPoolComponent.h:129
int32 EndCullDistance
Definition GeometryCollectionISMPoolComponent.h:122
uint32 GroupHash
Definition GeometryCollectionISMPoolComponent.h:124
FName StatsCategory
Definition GeometryCollectionISMPoolComponent.h:127
EFlags
Definition GeometryCollectionISMPoolComponent.h:104
@ DistanceCullPrimitive
Definition GeometryCollectionISMPoolComponent.h:115
@ EvaluateWorldPositionOffset
Definition GeometryCollectionISMPoolComponent.h:110
@ AffectDynamicIndirectLighting
Definition GeometryCollectionISMPoolComponent.h:113
@ WorldPositionOffsetWritesVelocity
Definition GeometryCollectionISMPoolComponent.h:109
@ AffectDistanceFieldLighting
Definition GeometryCollectionISMPoolComponent.h:112
@ ReverseCulling
Definition GeometryCollectionISMPoolComponent.h:107
@ AffectFarShadow
Definition GeometryCollectionISMPoolComponent.h:114
@ StaticMobility
Definition GeometryCollectionISMPoolComponent.h:108
@ GpuLodSelection
Definition GeometryCollectionISMPoolComponent.h:106
@ UseHISM
Definition GeometryCollectionISMPoolComponent.h:105
@ AffectShadow
Definition GeometryCollectionISMPoolComponent.h:111
uint32 Flags
Definition GeometryCollectionISMPoolComponent.h:118
int32 MinLod
Definition GeometryCollectionISMPoolComponent.h:123
FVector Position
Definition GeometryCollectionISMPoolComponent.h:120
TArray< FName > Tags
Definition GeometryCollectionISMPoolComponent.h:126
Definition GeometryCollectionISMPoolComponent.h:28
int32 Start
Definition GeometryCollectionISMPoolComponent.h:35
FInstanceGroupRange(int32 InStart, int32 InCount)
Definition GeometryCollectionISMPoolComponent.h:29
int32 Count
Definition GeometryCollectionISMPoolComponent.h:36
Definition GeometryCollectionISMPoolComponent.h:23
void Reset()
Definition GeometryCollectionISMPoolComponent.h:40
bool IsEmpty() const
Definition GeometryCollectionISMPoolComponent.h:49
TArray< FInstanceGroupId > FreeList
Definition GeometryCollectionISMPoolComponent.h:95
int32 TotalInstanceCount
Definition GeometryCollectionISMPoolComponent.h:92
void RemoveGroup(FInstanceGroupId GroupId)
Definition GeometryCollectionISMPoolComponent.h:84
int32 TotalFreeInstanceCount
Definition GeometryCollectionISMPoolComponent.h:93
FInstanceGroupId AddGroup(int32 Count)
Definition GeometryCollectionISMPoolComponent.h:61
int32 GetMaxInstanceIndex() const
Definition GeometryCollectionISMPoolComponent.h:55
TArray< FInstanceGroupRange > GroupRanges
Definition GeometryCollectionISMPoolComponent.h:94
int32 FInstanceGroupId
Definition GeometryCollectionISMPoolComponent.h:24
Definition ResourceSize.h:31
Definition ObjectPtr.h:488
Definition WeakObjectPtrTemplates.h:25
FORCEINLINE bool HasSameIndexAndSerialNumber(const TWeakObjectPtr &Other) const
Definition WeakObjectPtrTemplates.h:273
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79