UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISMComponentBatcher.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
9
11class UInstancedSkinnedMeshComponent;
12
15{
16public:
20
25
31
38
45
53
60 {
62 {
64 }
65 }
66
80
94
109
114
120
125 ENGINE_API void InitComponent(UInstancedSkinnedMeshComponent* ISMComponent) const;
126
127 inline uint32 GetHash() const
128 {
129 if (Hash == 0)
130 {
131 ComputeHash();
132 }
133 return Hash;
134 }
135
145
151
152protected:
154 void ENGINE_API ComputeHash() const;
155
156 mutable uint32 Hash = 0;
159
162
163 // For ISMC only
166
167 // For ISKMC only
169
170 // Mapping info to be able to use GetComponentsToInstancesMap() to retrieve the range of instances associated with a component added to the ISM batcher.
171 bool bBuildMappingInfo = false;
173};
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
UE::Math::TTransform< double > FTransform
Definition MathFwd.h:53
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Array.h:670
Definition AssetRegistryState.h:50
Definition ActorComponent.h:152
Definition InstancedStaticMeshComponent.h:158
Definition ISMComponentBatcher.h:140
uint32 InstancesStart
Definition ISMComponentBatcher.h:142
const UActorComponent * Component
Definition ISMComponentBatcher.h:141
uint32 InstancesCount
Definition ISMComponentBatcher.h:143
Definition ISMComponentBatcher.h:15
int32 NumCustomDataFloats
Definition ISMComponentBatcher.h:158
void Append(const TArray< TComponentClass * > &InComponents, TFunctionRef< FTransform(const FTransform &)> InTransformFunc)
Definition ISMComponentBatcher.h:73
int32 InstancingRandomSeed
Definition ISMComponentBatcher.h:164
void ENGINE_API AddInternal(const UActorComponent *InComponent, TOptional< TFunctionRef< FTransform(const FTransform &)> > InTransformFunc, TOptional< TFunctionRef< bool(const FBox &)> > InFilterFunc)
Definition ISMComponentBatcher.cpp:30
TArray< FComponentToInstancesMapping > ComponentsToInstancesMap
Definition ISMComponentBatcher.h:172
void Append(const TArray< TComponentClass * > &InComponents, TFunctionRef< bool(const FBox &)> InFilterFunc)
Definition ISMComponentBatcher.h:87
ENGINE_API void InitComponent(UInstancedStaticMeshComponent *ISMComponent) const
Definition ISMComponentBatcher.cpp:209
void Append(const TArray< TComponentClass * > &InComponents)
Definition ISMComponentBatcher.h:59
void ENGINE_API ComputeHash() const
Definition ISMComponentBatcher.cpp:234
uint32 Hash
Definition ISMComponentBatcher.h:156
FISMComponentBatcher()
Definition ISMComponentBatcher.h:17
FISMComponentBatcher(bool bInBuildMappingInfo)
Definition ISMComponentBatcher.h:21
TArray< FInstancedStaticMeshRandomSeed > AdditionalRandomSeeds
Definition ISMComponentBatcher.h:165
uint32 GetHash() const
Definition ISMComponentBatcher.h:127
TArray< int32 > AnimationIndices
Definition ISMComponentBatcher.h:168
int32 GetNumInstances() const
Definition ISMComponentBatcher.h:113
ENGINE_API TArray< FComponentToInstancesMapping > GetComponentsToInstancesMap()
Definition ISMComponentBatcher.cpp:253
void Append(const TArray< TComponentClass * > &InComponents, TFunctionRef< FTransform(const FTransform &)> InTransformFunc, TFunctionRef< bool(const FBox &)> InFilterFunc)
Definition ISMComponentBatcher.h:102
bool bBuildMappingInfo
Definition ISMComponentBatcher.h:171
TArray< FTransform > InstancesTransformsWS
Definition ISMComponentBatcher.h:160
int32 NumInstances
Definition ISMComponentBatcher.h:157
TArray< float > InstancesCustomData
Definition ISMComponentBatcher.h:161
Definition Optional.h:131