15 template <
class T,
bool bSupportHitProxies = true>
31template <
class T,
bool bSupportHitProxies>
40 Flags.bHasPerInstanceCustomData =
ComponentDesc.PrimitiveMaterialDesc.bAnyMaterialHasPerInstanceCustomData &&
InComponent.NumCustomDataFloats != 0;
50 const bool bForceRefPose = UInstancedSkinnedMeshComponent::ShouldForceRefPose();
53 Flags.bHasPerInstanceHierarchyOffset =
false;
55 Flags.bHasPerInstanceDynamicData =
false;
56 Flags.bHasPerInstanceSkinningData =
true;
58 Flags.bHasPerInstanceLMSMUVBias =
false;
78 bHasPerInstanceLocalBounds =
Flags.bHasPerInstanceLocalBounds
85 if (TransformProvider)
88 [&
InComponent, TransformProvider, ComponentTransform](
int32 InstanceIndex)->uint32
97 ChangeSet.GetSkinningDataWriter().Gather(0u);
100 if (TransformProvider && bHasPerInstanceLocalBounds)
105 const uint32 AnimationIndex =
InComponent.InstanceData[InstanceIndex].AnimationIndex;
116 ChangeSet.GetLocalBoundsWriter().Gather(MeshBounds);
122 if (
ChangeSet.Flags.bHasPerInstanceEditorData)
149 const bool bUseAnimationBounds = UInstancedSkinnedMeshComponent::ShouldUseAnimationBounds();
156 const bool bFastBuild =
false;
172 for (
int32 InstanceIndex = 0; InstanceIndex <
InComponent.InstanceData.Num(); InstanceIndex++)
181 for (
int32 InstanceIndex = 0; InstanceIndex <
InComponent.InstanceData.Num(); InstanceIndex++)
202 for (
int32 InstanceIndex = 0; InstanceIndex <
InComponent.InstanceData.Num(); InstanceIndex++)
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
#define check(expr)
Definition AssertionMacros.h:314
#define GIsEditor
Definition CoreGlobals.h:233
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
Definition InstanceUpdateChangeSet.h:298
Definition InstancedSkinnedMeshComponentHelper.h:13
static FPrimitiveSceneProxy * CreateSceneProxy(const T &InComponent, const FInstancedSkinnedMeshSceneProxyDesc &Desc)
Definition InstancedSkinnedMeshComponentHelper.h:233
static FInstanceDataManagerSourceDataDesc GetComponentDesc(T &InComponent, EShaderPlatform ShaderPlatform)
Definition InstancedSkinnedMeshComponentHelper.h:32
static FSkeletalMeshObject * CreateMeshObject(const T &InComponent, const FInstancedSkinnedMeshSceneProxyDesc &InSceneProxyDesc)
Definition InstancedSkinnedMeshComponentHelper.h:215
static FBoxSphereBounds CalcBounds(const T &InComponent, const FTransform &LocalToWorld)
Definition InstancedSkinnedMeshComponentHelper.h:140
static bool IsEnabled(const T &InComponent)
Definition InstancedSkinnedMeshComponentHelper.h:221
static FPrimitiveMaterialPropertyDescriptor GetUsedMaterialPropertyDesc(const T &Component, EShaderPlatform InShaderPlatform)
Definition PrimitiveComponentHelper.h:33
Definition PrimitiveSceneProxy.h:296
Definition SkeletalRenderPublic.h:85
static bool ShouldNaniteSkin(const T &InComponent)
Definition SkinnedMeshComponentHelper.h:197
static int32 ComputeMinLOD(const T &InComponent)
Definition SkinnedMeshComponentHelper.h:83
static FSkeletalMeshRenderData * GetSkeletalMeshRenderData(const T &InComponent)
Definition SkinnedMeshComponentHelper.h:54
Definition SkeletalMesh.h:440
Definition SkinnedAsset.h:47
virtual FBoxSphereBounds GetBounds() const PURE_VIRTUAL(USkinnedAsset
Definition SkinnedAsset.h:143
Definition InstanceDataManager.h:20
FPrimitiveMaterialPropertyDescriptor PrimitiveMaterialDesc
Definition InstanceDataManager.h:26
Definition InstancedSkinnedMeshSceneProxyDesc.h:11
static ENGINE_API FSkeletalMeshObject * CreateMeshObject(const FInstancedSkinnedMeshSceneProxyDesc &Desc, FSkeletalMeshRenderData *InRenderData, ERHIFeatureLevel::Type InFeatureLevel)
Definition InstancedSkinnedMeshSceneProxyDesc.cpp:10
static ENGINE_API FPrimitiveSceneProxy * CreateSceneProxy(const FInstancedSkinnedMeshSceneProxyDesc &Desc, bool bHideSkin, bool bShouldNaniteSkin, bool bIsEnabled, int32 MinLODIndex)
Definition InstancedSkinnedMeshSceneProxyDesc.cpp:25
Definition RenderTransform.h:272
FBox ToBox() const
Definition RenderTransform.h:301
Definition InstancedSkinnedMeshComponent.h:24
Definition BoxSphereBounds.h:336
Definition BoxSphereBounds.h:25
TBox< T > TransformBy(const TMatrix< T > &M) const
Definition Box.h:871
uint8 IsValid
Definition Box.h:45
static CORE_API const TVector< float > ZeroVector
Definition Vector.h:79
Definition InstanceDataTypes.h:36
uint16 bHasPerInstanceRandom
Definition InstanceDataTypes.h:40