UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UHierarchicalInstancedStaticMeshComponent Class Reference

#include <HierarchicalInstancedStaticMeshComponent.h>

+ Inheritance diagram for UHierarchicalInstancedStaticMeshComponent:

Classes

class  FClusterBuilder
 
struct  FClusterTree
 

Public Member Functions

ENGINE_API void ApplyBuildTreeAsync (ENamedThreads::Type CurrentThread, const FGraphEventRef &MyCompletionGraphEvent, TSharedRef< FClusterBuilder, ESPMode::ThreadSafe > Builder, double StartTime)
 
virtual ENGINE_API void Serialize (FArchive &Ar) override
 
virtual ENGINE_API void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) override
 
virtual ENGINE_API void PostLoad () override
 
virtual ENGINE_API void PostEditImport () override
 
virtual ENGINE_API FPrimitiveSceneProxyCreateSceneProxy () override
 
virtual ENGINE_API FBoxSphereBounds CalcBounds (const FTransform &BoundTransform) const override
 
virtual ENGINE_API int32 AddInstance (const FTransform &InstanceTransform, bool bWorldSpace=false) override
 
virtual ENGINE_API TArray< int32AddInstances (const TArray< FTransform > &InstanceTransforms, bool bShouldReturnIndices, bool bWorldSpace=false, bool bUpdateNavigation=true) override
 
virtual ENGINE_API bool RemoveInstance (int32 InstanceIndex) override
 
virtual ENGINE_API bool RemoveInstances (const TArray< int32 > &InstancesToRemove) override
 
virtual ENGINE_API bool RemoveInstances (const TArray< int32 > &InstancesToRemove, bool bInstanceArrayAlreadySortedInReverseOrder) override
 
virtual ENGINE_API bool UpdateInstanceTransform (int32 InstanceIndex, const FTransform &NewInstanceTransform, bool bWorldSpace, bool bMarkRenderStateDirty=false, bool bTeleport=false) override
 
virtual ENGINE_API bool SetCustomDataValue (int32 InstanceIndex, int32 CustomDataIndex, float CustomDataValue, bool bMarkRenderStateDirty=false) override
 
virtual ENGINE_API bool SetCustomData (int32 InstanceIndex, TArrayView< const float > InCustomData, bool bMarkRenderStateDirty=false) override
 
virtual ENGINE_API bool BatchUpdateInstancesTransforms (int32 StartInstanceIndex, const TArray< FTransform > &NewInstancesTransforms, bool bWorldSpace=false, bool bMarkRenderStateDirty=false, bool bTeleport=false) override
 
virtual ENGINE_API bool BatchUpdateInstancesTransforms (int32 StartInstanceIndex, TArrayView< const FTransform > NewInstancesTransforms, bool bWorldSpace, bool bMarkRenderStateDirty, bool bTeleport) override
 
virtual ENGINE_API bool BatchUpdateInstancesTransform (int32 StartInstanceIndex, int32 NumInstances, const FTransform &NewInstancesTransform, bool bWorldSpace=false, bool bMarkRenderStateDirty=false, bool bTeleport=false) override
 
virtual ENGINE_API bool BatchUpdateInstancesData (int32 StartInstanceIndex, int32 NumInstances, FInstancedStaticMeshInstanceData *StartInstanceData, bool bMarkRenderStateDirty=false, bool bTeleport=false) override
 
virtual ENGINE_API void ClearInstances () override
 
virtual ENGINE_API TArray< int32GetInstancesOverlappingSphere (const FVector &Center, float Radius, bool bSphereInWorldSpace=true) const override
 
virtual ENGINE_API TArray< int32GetInstancesOverlappingBox (const FBox &Box, bool bBoxInWorldSpace=true) const override
 
virtual ENGINE_API void PreAllocateInstancesMemory (int32 AddedInstanceCount) override
 
virtual bool SupportsRemoveSwap () const override
 
ENGINE_API int32 GetOverlappingSphereCount (const FSphere &Sphere) const
 
ENGINE_API int32 GetOverlappingBoxCount (const FBox &Box) const
 
ENGINE_API void GetOverlappingBoxTransforms (const FBox &Box, TArray< FTransform > &OutTransforms) const
 
ENGINE_API bool BuildTreeIfOutdated (bool Async, bool ForceUpdate)
 
bool IsAsyncBuilding () const
 
bool IsTreeFullyBuilt () const
 
ENGINE_API void GetTree (TArray< FClusterNode > &OutClusterTree) const
 
ENGINE_API FVector GetAverageScale () const
 
ENGINE_API int32 DesiredInstancesPerLeaf ()
 
virtual ENGINE_API void ApplyComponentInstanceData (struct FInstancedStaticMeshComponentInstanceData *InstancedMeshData) override
 
virtual int32 GetNumRenderInstances () const
 
ENGINE_API void UpdateDensityScaling ()
 
virtual ENGINE_API void PropagateLightingScenarioChange () override
 
EHISMViewRelevanceType GetViewRelevanceType () const
 
- Public Member Functions inherited from UInstancedStaticMeshComponent
int32 GetRenderIndex (int32 InInstanceIndex) const
 
int32 AddInstanceWorldSpace (const FTransform &WorldTransform)
 
int32 GetNumInstances () const
 
ENGINE_API TArray< FPrimitiveInstanceIdAddInstancesById (const TArrayView< const FTransform > &InstanceTransforms, bool bWorldSpace=false, bool bUpdateNavigation=true)
 
ENGINE_API FPrimitiveInstanceId AddInstanceById (const FTransform &InstanceTransforms, bool bWorldSpace=false)
 
ENGINE_API void SetCustomDataById (const TArrayView< const FPrimitiveInstanceId > &InstanceIds, TArrayView< const float > CustomDataFloats)
 
void SetCustomDataById (FPrimitiveInstanceId InstanceId, TArrayView< const float > CustomDataFloats)
 
ENGINE_API void SetCustomDataValueById (FPrimitiveInstanceId InstanceId, int32 CustomDataIndex, float CustomDataValue)
 
virtual ENGINE_API void RemoveInstancesById (const TArrayView< const FPrimitiveInstanceId > &InstanceIds, bool bUpdateNavigation=true)
 
void RemoveInstanceById (FPrimitiveInstanceId InstanceId)
 
ENGINE_API void UpdateInstanceTransformById (FPrimitiveInstanceId InstanceId, const FTransform &NewInstanceTransform, bool bWorldSpace=false, bool bTeleport=false)
 
ENGINE_API void SetPreviousTransformById (FPrimitiveInstanceId InstanceId, const FTransform &NewPrevInstanceTransform, bool bWorldSpace=false)
 
ENGINE_API bool IsValidId (FPrimitiveInstanceId InstanceId)
 
int32 GetInstanceIndexForId (FPrimitiveInstanceId InstanceId) const
 
ENGINE_API void SetHasPerInstancePrevTransforms (bool bInHasPreviousTransforms)
 
virtual ENGINE_API void SetNumCustomDataFloats (int32 InNumCustomDataFloats)
 
virtual ENGINE_API bool SetCustomData (int32 InstanceIndexStart, int32 InstanceIndexEnd, TConstArrayView< float > CustomDataFloats, bool bMarkRenderStateDirty=false)
 
ENGINE_API bool GetInstanceTransform (int32 InstanceIndex, FTransform &OutInstanceTransform, bool bWorldSpace=false) const
 
float GetLODDistanceScale () const
 
ENGINE_API void SetLODDistanceScale (float InLODDistanceScale)
 
ENGINE_API bool GetInstancePrevTransform (int32 InstanceIndex, FTransform &OutInstanceTransform, bool bWorldSpace=false) const
 
virtual ENGINE_API void OnUpdateTransform (EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport) override
 
ENGINE_API void UpdateComponentTransform (EUpdateTransformFlags UpdateTransformFlags, ETeleportType Teleport)
 
virtual ENGINE_API float GetTextureStreamingTransformScale () const override
 
virtual ENGINE_API bool GetMaterialStreamingData (int32 MaterialIndex, FPrimitiveMaterialInfo &MaterialData) const override
 
virtual ENGINE_API bool BuildTextureStreamingDataImpl (ETextureStreamingBuildType BuildType, EMaterialQualityLevel::Type QualityLevel, ERHIFeatureLevel::Type FeatureLevel, TSet< FGuid > &DependentResources, bool &bOutSupportsBuildTextureStreamingData) override
 
virtual ENGINE_API void GetStreamingRenderAssetInfo (FStreamingTextureLevelContext &LevelContext, TArray< FStreamingRenderAssetPrimitiveInfo > &OutStreamingRenderAssets) const override
 
virtual ENGINE_API bool BatchUpdateInstancesTransforms (int32 StartInstanceIndex, const TArray< FTransform > &NewInstancesTransforms, const TArray< FTransform > &NewInstancesPrevTransforms, bool bWorldSpace=false, bool bMarkRenderStateDirty=false, bool bTeleport=false)
 
ENGINE_API int32 GetInstanceCount () const
 
ENGINE_API bool IsValidInstance (int32 InstanceIndex) const
 
ENGINE_API void SetCullDistances (int32 StartCullDistance, int32 EndCullDistance)
 
void GetCullDistances (int32 &OutStartCullDistance, int32 &OutEndCullDistance) const
 
virtual ENGINE_API bool ShouldCreatePhysicsState () const override
 
virtual ENGINE_API void OnRegister () override
 
virtual ENGINE_API void OnUnregister () override
 
void SetRemoveSwap ()
 
void SetUseConservativeBounds (bool bValue)
 
ENGINE_API FInstanceDataFlags MakeInstanceDataFlags (bool bAnyMaterialHasPerInstanceRandom, bool bAnyMaterialHasPerInstanceCustomData) const
 
virtual ENGINE_API TStructOnScope< FActorComponentInstanceDataGetComponentInstanceData () const override
 
virtual ENGINE_API void GetComponentChildElements (TArray< FTypedElementHandle > &OutElementHandles, const bool bAllowCreate=true) override
 
virtual ENGINE_API bool IsHLODRelevant () const override
 
virtual ENGINE_API void SendRenderInstanceData_Concurrent () override
 
virtual ENGINE_API FMatrix GetRenderMatrix () const override
 
virtual ENGINE_API FBodyInstanceGetBodyInstance (FName BoneName=NAME_None, bool bGetWelded=true, int32 Index=INDEX_NONE) const override
 
virtual ENGINE_API void RecreateInstanceBody (int32 InstanceBodyIndex) override
 
virtual ENGINE_API bool CanEditSimulatePhysics () override
 
virtual ENGINE_API void UpdateBounds () override
 
virtual bool SupportsStaticLighting () const override
 
virtual ENGINE_API void GetLightAndShadowMapMemoryUsage (int32 &LightMapMemoryUsage, int32 &ShadowMapMemoryUsage) const override
 
virtual ENGINE_API bool DoCustomNavigableGeometryExport (FNavigableGeometryExport &GeomExport) const override
 
virtual ENGINE_API bool LineTraceComponent (FHitResult &OutHit, const FVector Start, const FVector End, const FCollisionQueryParams &Params) override
 
virtual ENGINE_API bool SweepComponent (FHitResult &OutHit, const FVector Start, const FVector End, const FQuat &ShapRotation, const FCollisionShape &CollisionShape, bool bTraceComplex=false) override
 
virtual ENGINE_API bool OverlapComponent (const FVector &Pos, const FQuat &Rot, const FCollisionShape &CollisionShape) const override
 
virtual ENGINE_API Chaos::FPhysicsObjectGetPhysicsObjectById (Chaos::FPhysicsObjectId Id) const override
 
virtual ENGINE_API TArray< Chaos::FPhysicsObject * > GetAllPhysicsObjects () const override
 
virtual ENGINE_API void GetNavigationData (FNavigationRelevantData &Data) const override
 
virtual ENGINE_API FBox GetNavigationBounds () const override
 
virtual ENGINE_API bool IsNavigationRelevant () const override
 
virtual ENGINE_API bool ShouldSkipDirtyAreaOnAddOrRemove () const override
 
virtual ENGINE_API void BeginDestroy () override
 
virtual ENGINE_API void PreSave (FObjectPreSaveContext ObjectSaveContext) override
 
ENGINE_API void PreApplyComponentInstanceData (struct FInstancedStaticMeshComponentInstanceData *ComponentInstanceData)
 
ENGINE_API bool IsInstanceSelected (int32 InInstanceIndex) const
 
ENGINE_API void SelectInstance (bool bInSelected, int32 InInstanceIndex, int32 InInstanceCount=1)
 
ENGINE_API void ClearInstanceSelection ()
 
virtual ENGINE_API void CollectPSOPrecacheData (const FPSOPrecacheParams &BasePrecachePSOParams, FMaterialInterfacePSOPrecacheParamsList &OutParams) override
 
ENGINE_API void GetInstancesMinMaxScale (FVector &MinScale, FVector &MaxScale) const
 
void OnPostPopulatePerInstanceData ()
 
virtual ENGINE_API void PartialNavigationUpdates (TConstArrayView< FTransform > InstanceTransforms)
 
ENGINE_API TSharedPtr< FISMCInstanceDataSceneProxy, ESPMode::ThreadSafeGetOrCreateInstanceDataSceneProxy ()
 
ENGINE_API const TSharedPtr< FISMCInstanceDataSceneProxy, ESPMode::ThreadSafe > & GetInstanceDataSceneProxy () const
 
ENGINE_API void SetBakedLightingDataChanged (int32 InInstanceIndex)
 
ENGINE_API void SetBakedLightingDataChangedAll ()
 
ENGINE_API void InvalidateInstanceDataTracking ()
 
FPrimitiveMaterialPropertyDescriptor GetUsedMaterialPropertyDesc (EShaderPlatform ShaderPlatform) const
 
FPrimitiveMaterialPropertyDescriptor GetUsedMaterialPropertyDesc (ERHIFeatureLevel::Type FeatureLevel) const
 
- Public Member Functions inherited from ISMInstanceManager
virtual FText GetSMInstanceDisplayName (const FSMInstanceId &InstanceId) const
 
virtual FText GetSMInstanceTooltip (const FSMInstanceId &InstanceId) const
 
virtual void ForEachSMInstanceInSelectionGroup (const FSMInstanceId &InstanceId, TFunctionRef< bool(FSMInstanceId)> Callback)
 
virtual bool CanDeleteSMInstance (const FSMInstanceId &InstanceId) const
 
virtual bool CanDuplicateSMInstance (const FSMInstanceId &InstanceId) const
 
virtual TSubclassOf< USMInstanceProxyEditingObjectGetSMInstanceEditingProxyClass () const
 

Protected Member Functions

virtual ENGINE_API void BuildComponentInstanceData (ERHIFeatureLevel::Type FeatureLevel, FInstanceUpdateComponentDesc &OutData) override
 
virtual ENGINE_API void BuildComponentInstanceData (EShaderPlatform InShaderPlatform, FInstanceUpdateComponentDesc &OutData) override
 
virtual ENGINE_API void BuildTree ()
 
virtual ENGINE_API void BuildTreeAsync ()
 
ENGINE_API void ApplyBuildTree (FClusterBuilder &Builder, const bool bWasAsyncBuild)
 
ENGINE_API void ApplyEmpty ()
 
ENGINE_API void SetPerInstanceLightMapAndEditorData (FStaticMeshInstanceData &PerInstanceData, const TArray< TRefCountPtr< HHitProxy > > &HitProxies)
 
ENGINE_API FVector CalcTranslatedInstanceSpaceOrigin () const
 
ENGINE_API void GetInstanceTransforms (TArray< FMatrix > &InstanceTransforms, FVector const &Offset) const
 
ENGINE_API void RemoveInstancesInternal (TConstArrayView< int32 > InstanceIndices)
 
ENGINE_API int32 GetVertsForLOD (int32 LODIndex)
 
ENGINE_API float ActualInstancesPerLeaf ()
 
ENGINE_API void PostBuildStats ()
 
virtual ENGINE_API void OnPostLoadPerInstanceData () override
 
virtual ENGINE_API FPrimitiveSceneProxyCreateStaticMeshSceneProxy (Nanite::FMaterialAudit &NaniteMaterials, bool bCreateNanite) override
 
virtual FVector GetTranslatedInstanceSpaceOrigin () const override
 
virtual ENGINE_API void GetNavigationPerInstanceTransforms (const FBox &AreaBox, TArray< FTransform > &InstanceData) const override
 
virtual ENGINE_API void PartialNavigationUpdate (int32 InstanceIdx) override
 
virtual bool SupportsPartialNavigationUpdate () const override
 
ENGINE_API void FlushAccumulatedNavigationUpdates ()
 
- Protected Member Functions inherited from UInstancedStaticMeshComponent
virtual ENGINE_API void OnCreatePhysicsState () override
 
virtual ENGINE_API void OnDestroyPhysicsState () override
 
virtual ENGINE_API bool OnAsyncDestroyPhysicsState (const UE::FTimeout &Timeout) override
 
virtual ENGINE_API void OnAsyncDestroyPhysicsStateBegin_GameThread () override
 
virtual ENGINE_API bool ComponentOverlapComponentImpl (class UPrimitiveComponent *PrimComp, const FVector Pos, const FQuat &Quat, const FCollisionQueryParams &Params) override
 
virtual ENGINE_API bool ComponentOverlapMultiImpl (TArray< struct FOverlapResult > &OutOverlaps, const class UWorld *InWorld, const FVector &Pos, const FQuat &Rot, ECollisionChannel TestChannel, const struct FComponentQueryParams &Params, const struct FCollisionObjectQueryParams &ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const override
 
void InvalidateCachedBounds ()
 
ENGINE_API void CalcAndCacheNavigationBounds ()
 
ENGINE_API void CreateAllInstanceBodies ()
 
ENGINE_API void ClearAllInstanceBodies ()
 
virtual ENGINE_API void FullNavigationUpdate ()
 
FBoxSphereBounds CalcBoundsImpl (const FTransform &BoundTransform, bool bForNavigation) const
 
FBoxSphereBounds CalcBoundsImpl (const FTransform &BoundTransform, const FBox &InstanceBounds) const
 
ENGINE_API int32 AddInstanceInternal (int32 InstanceIndex, FInstancedStaticMeshInstanceData *InNewInstanceData, const FTransform &InstanceTransform, bool bWorldSpace)
 
ENGINE_API TArray< int32AddInstancesInternal (TConstArrayView< FTransform > InstanceTransforms, bool bShouldReturnIndices, bool bWorldSpace, bool bUpdateNavigation=true)
 
ENGINE_API bool RemoveInstanceInternal (int32 InstanceIndex, bool InstanceAlreadyRemoved, bool bForceRemoveAtSwap=false, bool bUpdateNavigation=true)
 
FBox GetInstanceNavigationBounds () const
 
ENGINE_API void InitInstanceBody (int32 InstanceIdx, FBodyInstance *InBodyInstance)
 
ENGINE_API void InitInstanceBody (int32 InstanceIdx, FBodyInstance *InstanceBodyInstance, FBodyInstance *ReferenceBodyInstance, bool bRuntimeBodyInstance, UBodySetup *BodySetup)
 
ENGINE_API void ApplyLightMapping (FStaticLightingTextureMapping_InstancedStaticMesh *InMapping, const FStaticLightingBuildContext *LightingContext)
 
ENGINE_API void CreateHitProxyData (TArray< TRefCountPtr< HHitProxy > > &HitProxies)
 
ENGINE_API void BuildLegacyRenderData (FStaticMeshInstanceData &OutData)
 
ENGINE_API void SerializeRenderData (FArchive &Ar)
 
ENGINE_API void BuildInstanceDataDeltaChangeSetCommon (FISMInstanceUpdateChangeSet &ChangeSet)
 
virtual ENGINE_API bool CanEditSMInstance (const FSMInstanceId &InstanceId) const override
 
virtual ENGINE_API bool CanMoveSMInstance (const FSMInstanceId &InstanceId, const ETypedElementWorldType InWorldType) const override
 
virtual ENGINE_API bool GetSMInstanceTransform (const FSMInstanceId &InstanceId, FTransform &OutInstanceTransform, bool bWorldSpace=false) const override
 
virtual ENGINE_API bool SetSMInstanceTransform (const FSMInstanceId &InstanceId, const FTransform &InstanceTransform, bool bWorldSpace=false, bool bMarkRenderStateDirty=false, bool bTeleport=false) override
 
virtual ENGINE_API void NotifySMInstanceMovementStarted (const FSMInstanceId &InstanceId) override
 
virtual ENGINE_API void NotifySMInstanceMovementOngoing (const FSMInstanceId &InstanceId) override
 
virtual ENGINE_API void NotifySMInstanceMovementEnded (const FSMInstanceId &InstanceId) override
 
virtual ENGINE_API void NotifySMInstanceSelectionChanged (const FSMInstanceId &InstanceId, const bool bIsSelected) override
 
virtual ENGINE_API bool DeleteSMInstances (TArrayView< const FSMInstanceId > InstanceIds) override
 
virtual ENGINE_API bool DuplicateSMInstances (TArrayView< const FSMInstanceId > InstanceIds, TArray< FSMInstanceId > &OutNewInstanceIds) override
 
void InitializeInstancingRandomSeed (const bool bAllowRandomSeedValue=false)
 

Static Protected Member Functions

static ENGINE_API FBox GetClusterTreeBounds (TArray< FClusterNode > const &InClusterTree, const FVector &InOffset)
 

Protected Attributes

FBox AccumulatedNavigationDirtyArea
 
TArray< FBoxAccumulatedNavigationDirtyAreas
 
FGraphEventArray BuildTreeAsyncTasks
 
EHISMViewRelevanceType ViewRelevanceType = EHISMViewRelevanceType::HISM
 
friend FStaticLightingTextureMapping_InstancedStaticMesh
 
friend FInstancedLightMap2D
 
friend FInstancedShadowMap2D
 
friend FClusterBuilder
 
- Protected Attributes inherited from UInstancedStaticMeshComponent
uint8 bIsInstanceDataApplyCompleted: 1
 
int32 NumPendingLightmaps
 
FPrimitiveInstanceDataManager PrimitiveInstanceDataManager
 
TArray< FInstancedStaticMeshMappingInfoCachedMappings
 
friend FStaticLightingTextureMapping_InstancedStaticMesh
 
friend FInstancedLightMap2D
 
friend FInstancedShadowMap2D
 

Friends

class ALightWeightInstanceStaticMeshManager
 

Additional Inherited Members

- Public Attributes inherited from UInstancedStaticMeshComponent
TArray< int32InstanceReorderTable
 
SIZE_T ProxySize
 
TArray< FBodyInstance * > InstanceBodies
 
- Protected Types inherited from UInstancedStaticMeshComponent
enum class  EBoundsCacheType : uint8 {
  Component , Navigation , Local , Count ,
  Other
}
 

Member Function Documentation

◆ ActualInstancesPerLeaf()

float UHierarchicalInstancedStaticMeshComponent::ActualInstancesPerLeaf ( )
protected

Average number of instances per leaf

◆ AddInstance()

int32 UHierarchicalInstancedStaticMeshComponent::AddInstance ( const FTransform InstanceTransform,
bool  bWorldSpace = false 
)
overridevirtual

Add an instance to this component. Transform is given in local space of this component unless bWorldSpace is set.

Reimplemented from UInstancedStaticMeshComponent.

◆ AddInstances()

TArray< int32 > UHierarchicalInstancedStaticMeshComponent::AddInstances ( const TArray< FTransform > &  InstanceTransforms,
bool  bShouldReturnIndices,
bool  bWorldSpace = false,
bool  bUpdateNavigation = true 
)
overridevirtual

Add multiple instances to this component. Transform is given in local space of this component unless bWorldSpace is set.

Reimplemented from UInstancedStaticMeshComponent.

◆ ApplyBuildTree()

void UHierarchicalInstancedStaticMeshComponent::ApplyBuildTree ( FClusterBuilder Builder,
const bool  bWasAsyncBuild 
)
protected

◆ ApplyBuildTreeAsync()

void UHierarchicalInstancedStaticMeshComponent::ApplyBuildTreeAsync ( ENamedThreads::Type  CurrentThread,
const FGraphEventRef MyCompletionGraphEvent,
TSharedRef< FClusterBuilder, ESPMode::ThreadSafe Builder,
double  StartTime 
)

◆ ApplyComponentInstanceData()

void UHierarchicalInstancedStaticMeshComponent::ApplyComponentInstanceData ( struct FInstancedStaticMeshComponentInstanceData ComponentInstanceData)
overridevirtual

Applies the cached component instance data to a newly blueprint constructed component.

Reimplemented from UInstancedStaticMeshComponent.

◆ ApplyEmpty()

void UHierarchicalInstancedStaticMeshComponent::ApplyEmpty ( )
protected

◆ BatchUpdateInstancesData()

bool UHierarchicalInstancedStaticMeshComponent::BatchUpdateInstancesData ( int32  StartInstanceIndex,
int32  NumInstances,
FInstancedStaticMeshInstanceData StartInstanceData,
bool  bMarkRenderStateDirty = false,
bool  bTeleport = false 
)
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ BatchUpdateInstancesTransform()

bool UHierarchicalInstancedStaticMeshComponent::BatchUpdateInstancesTransform ( int32  StartInstanceIndex,
int32  NumInstances,
const FTransform NewInstancesTransform,
bool  bWorldSpace = false,
bool  bMarkRenderStateDirty = false,
bool  bTeleport = false 
)
overridevirtual

Update the transform for a number of instances.

Parameters
StartInstanceIndexThe starting index of the instances to update
NumInstancesThe number of instances to update
NewInstancesTransformThe new transform
bWorldSpaceIf true, the new transform is interpreted as a World Space transform, otherwise it is interpreted as Local Space
bMarkRenderStateDirtyIf true, the change should be visible immediately. If you are updating many instances you should only set this to true for the last instance.
bTeleportWhether or not the instances physics should be moved normally, or teleported (moved instantly, ignoring velocity).
Returns
True on success.

Reimplemented from UInstancedStaticMeshComponent.

◆ BatchUpdateInstancesTransforms() [1/2]

bool UHierarchicalInstancedStaticMeshComponent::BatchUpdateInstancesTransforms ( int32  StartInstanceIndex,
const TArray< FTransform > &  NewInstancesTransforms,
bool  bWorldSpace = false,
bool  bMarkRenderStateDirty = false,
bool  bTeleport = false 
)
overridevirtual

Update the transform for an array of instances.

Parameters
StartInstanceIndexThe starting index of the instances to update
NewInstancesTransformsThe new transforms
bWorldSpaceIf true, the new transforms are interpreted as a World Space transform, otherwise it is interpreted as Local Space
bMarkRenderStateDirtyIf true, the change should be visible immediately. If you are updating many instances you should only set this to true for the last instance.
bTeleportWhether or not the instances physics should be moved normally, or teleported (moved instantly, ignoring velocity).
Returns
True on success.

Reimplemented from UInstancedStaticMeshComponent.

◆ BatchUpdateInstancesTransforms() [2/2]

bool UHierarchicalInstancedStaticMeshComponent::BatchUpdateInstancesTransforms ( int32  StartInstanceIndex,
TArrayView< const FTransform NewInstancesTransforms,
bool  bWorldSpace,
bool  bMarkRenderStateDirty,
bool  bTeleport 
)
overridevirtual

this is array view version of the UFUNCTION, blueprints do not support ArrayViews at the time of adding this one

Reimplemented from UInstancedStaticMeshComponent.

◆ BuildComponentInstanceData() [1/2]

void UHierarchicalInstancedStaticMeshComponent::BuildComponentInstanceData ( ERHIFeatureLevel::Type  FeatureLevel,
FInstanceUpdateComponentDesc OutData 
)
overrideprotectedvirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ BuildComponentInstanceData() [2/2]

void UHierarchicalInstancedStaticMeshComponent::BuildComponentInstanceData ( EShaderPlatform  InShaderPlatform,
FInstanceUpdateComponentDesc OutData 
)
overrideprotectedvirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ BuildTree()

void UHierarchicalInstancedStaticMeshComponent::BuildTree ( )
protectedvirtual

◆ BuildTreeAsync()

void UHierarchicalInstancedStaticMeshComponent::BuildTreeAsync ( )
protectedvirtual

◆ BuildTreeIfOutdated()

bool UHierarchicalInstancedStaticMeshComponent::BuildTreeIfOutdated ( bool  Async,
bool  ForceUpdate 
)

◆ CalcBounds()

FBoxSphereBounds UHierarchicalInstancedStaticMeshComponent::CalcBounds ( const FTransform BoundTransform) const
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ CalcTranslatedInstanceSpaceOrigin()

FVector UHierarchicalInstancedStaticMeshComponent::CalcTranslatedInstanceSpaceOrigin ( ) const
protected

◆ ClearInstances()

void UHierarchicalInstancedStaticMeshComponent::ClearInstances ( )
overridevirtual

Clear all instances being rendered by this component.

Reimplemented from UInstancedStaticMeshComponent.

◆ CreateSceneProxy()

FPrimitiveSceneProxy * UHierarchicalInstancedStaticMeshComponent::CreateSceneProxy ( )
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ CreateStaticMeshSceneProxy()

FPrimitiveSceneProxy * UHierarchicalInstancedStaticMeshComponent::CreateStaticMeshSceneProxy ( Nanite::FMaterialAudit NaniteMaterials,
bool  bCreateNanite 
)
overrideprotectedvirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ DesiredInstancesPerLeaf()

int32 UHierarchicalInstancedStaticMeshComponent::DesiredInstancesPerLeaf ( )

Heuristic for the number of leaves in the tree

◆ FlushAccumulatedNavigationUpdates()

void UHierarchicalInstancedStaticMeshComponent::FlushAccumulatedNavigationUpdates ( )
protected

◆ GetAverageScale()

FVector UHierarchicalInstancedStaticMeshComponent::GetAverageScale ( ) const

◆ GetClusterTreeBounds()

FBox UHierarchicalInstancedStaticMeshComponent::GetClusterTreeBounds ( TArray< FClusterNode > const &  InClusterTree,
const FVector InOffset 
)
staticprotected

◆ GetInstancesOverlappingBox()

TArray< int32 > UHierarchicalInstancedStaticMeshComponent::GetInstancesOverlappingBox ( const FBox Box,
bool  bBoxInWorldSpace = true 
) const
overridevirtual

Returns the instances with instance bounds overlapping the specified box. The return value is an array of instance indices.

Reimplemented from UInstancedStaticMeshComponent.

◆ GetInstancesOverlappingSphere()

TArray< int32 > UHierarchicalInstancedStaticMeshComponent::GetInstancesOverlappingSphere ( const FVector Center,
float  Radius,
bool  bSphereInWorldSpace = true 
) const
overridevirtual

Returns the instances with instance bounds overlapping the specified sphere. The return value is an array of instance indices.

Reimplemented from UInstancedStaticMeshComponent.

◆ GetInstanceTransforms()

void UHierarchicalInstancedStaticMeshComponent::GetInstanceTransforms ( TArray< FMatrix > &  InstanceTransforms,
FVector const &  Offset 
) const
protected

◆ GetNavigationPerInstanceTransforms()

void UHierarchicalInstancedStaticMeshComponent::GetNavigationPerInstanceTransforms ( const FBox AreaBox,
TArray< FTransform > &  InstanceData 
) const
overrideprotectedvirtual

Handles request from navigation system to gather instance transforms in a specific area box.

Reimplemented from UInstancedStaticMeshComponent.

◆ GetNumRenderInstances()

virtual int32 UHierarchicalInstancedStaticMeshComponent::GetNumRenderInstances ( ) const
inlinevirtual

◆ GetOverlappingBoxCount()

int32 UHierarchicalInstancedStaticMeshComponent::GetOverlappingBoxCount ( const FBox Box) const

Get the number of instances that overlap a given box

◆ GetOverlappingBoxTransforms()

void UHierarchicalInstancedStaticMeshComponent::GetOverlappingBoxTransforms ( const FBox Box,
TArray< FTransform > &  OutTransforms 
) const

Get the transforms of instances inside the provided box

◆ GetOverlappingSphereCount()

int32 UHierarchicalInstancedStaticMeshComponent::GetOverlappingSphereCount ( const FSphere Sphere) const

Get the number of instances that overlap a given sphere

◆ GetResourceSizeEx()

void UHierarchicalInstancedStaticMeshComponent::GetResourceSizeEx ( FResourceSizeEx CumulativeResourceSize)
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ GetTranslatedInstanceSpaceOrigin()

virtual FVector UHierarchicalInstancedStaticMeshComponent::GetTranslatedInstanceSpaceOrigin ( ) const
inlineoverrideprotectedvirtual

Get the translated space for instance transforms to be passed to the renderer. In the renderer data structures we only have floating point precision for instance transforms relative to their owning primitive. The primitive transform itself has double precision. Some ISM that are authored in world space need to adjust the local space to keep instance transforms within precision limits.

Reimplemented from UInstancedStaticMeshComponent.

◆ GetTree()

void UHierarchicalInstancedStaticMeshComponent::GetTree ( TArray< FClusterNode > &  OutClusterTree) const

◆ GetVertsForLOD()

int32 UHierarchicalInstancedStaticMeshComponent::GetVertsForLOD ( int32  LODIndex)
protected

Gets and approximate number of verts for each LOD to generate heuristics

◆ GetViewRelevanceType()

EHISMViewRelevanceType UHierarchicalInstancedStaticMeshComponent::GetViewRelevanceType ( ) const
inline

◆ IsAsyncBuilding()

bool UHierarchicalInstancedStaticMeshComponent::IsAsyncBuilding ( ) const
inline

◆ IsTreeFullyBuilt()

bool UHierarchicalInstancedStaticMeshComponent::IsTreeFullyBuilt ( ) const
inline

◆ OnPostLoadPerInstanceData()

void UHierarchicalInstancedStaticMeshComponent::OnPostLoadPerInstanceData ( )
overrideprotectedvirtual

Creates rendering buffer from serialized data, if any

Reimplemented from UInstancedStaticMeshComponent.

◆ PartialNavigationUpdate()

void UHierarchicalInstancedStaticMeshComponent::PartialNavigationUpdate ( int32  InstanceIdx)
overrideprotectedvirtual

Request to navigation system to update only part of navmesh occupied by specified instance.

Reimplemented from UInstancedStaticMeshComponent.

◆ PostBuildStats()

void UHierarchicalInstancedStaticMeshComponent::PostBuildStats ( )
protected

For testing, prints some stats after any kind of build

◆ PostEditImport()

void UHierarchicalInstancedStaticMeshComponent::PostEditImport ( )
overridevirtual

◆ PostLoad()

void UHierarchicalInstancedStaticMeshComponent::PostLoad ( )
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ PreAllocateInstancesMemory()

void UHierarchicalInstancedStaticMeshComponent::PreAllocateInstancesMemory ( int32  AddedInstanceCount)
overridevirtual

Preallocated memory to include the new added instances count, to prevent reallloc during the add operation.

Reimplemented from UInstancedStaticMeshComponent.

◆ PropagateLightingScenarioChange()

void UHierarchicalInstancedStaticMeshComponent::PropagateLightingScenarioChange ( )
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ RemoveInstance()

bool UHierarchicalInstancedStaticMeshComponent::RemoveInstance ( int32  InstanceIndex)
overridevirtual

Remove the instance specified. Returns True on success.

Reimplemented from UInstancedStaticMeshComponent.

◆ RemoveInstances() [1/2]

bool UHierarchicalInstancedStaticMeshComponent::RemoveInstances ( const TArray< int32 > &  InstancesToRemove)
overridevirtual

Remove the instances specified. Returns True on success.

Reimplemented from UInstancedStaticMeshComponent.

◆ RemoveInstances() [2/2]

bool UHierarchicalInstancedStaticMeshComponent::RemoveInstances ( const TArray< int32 > &  InstancesToRemove,
bool  bInstanceArrayAlreadySortedInReverseOrder 
)
overridevirtual

Remove the instances specified. Returns True on success.

Parameters
InstancesToRemovearray of the instance indices to remove ( can be sorted
See also
bInstanceArrayAlreadySortedInReverseOrder )
Parameters
bInstanceArrayAlreadySortedInReverseOrdertrue is the array is already sorted in reverse order

Reimplemented from UInstancedStaticMeshComponent.

◆ RemoveInstancesInternal()

void UHierarchicalInstancedStaticMeshComponent::RemoveInstancesInternal ( TConstArrayView< int32 InstanceIndices)
protected

Removes specified instances

◆ Serialize()

PRAGMA_ENABLE_DEPRECATION_WARNINGS void UHierarchicalInstancedStaticMeshComponent::Serialize ( FArchive Ar)
overridevirtual

Reimplemented from UInstancedStaticMeshComponent.

◆ SetCustomData()

bool UHierarchicalInstancedStaticMeshComponent::SetCustomData ( int32  InstanceIndex,
TArrayView< const float CustomDataFloats,
bool  bMarkRenderStateDirty = false 
)
overridevirtual

Per Instance Custom Data

Reimplemented from UInstancedStaticMeshComponent.

◆ SetCustomDataValue()

bool UHierarchicalInstancedStaticMeshComponent::SetCustomDataValue ( int32  InstanceIndex,
int32  CustomDataIndex,
float  CustomDataValue,
bool  bMarkRenderStateDirty = false 
)
overridevirtual

Update custom data for specific instance

Reimplemented from UInstancedStaticMeshComponent.

◆ SetPerInstanceLightMapAndEditorData()

void UHierarchicalInstancedStaticMeshComponent::SetPerInstanceLightMapAndEditorData ( FStaticMeshInstanceData PerInstanceData,
const TArray< TRefCountPtr< HHitProxy > > &  HitProxies 
)
protected

◆ SupportsPartialNavigationUpdate()

virtual bool UHierarchicalInstancedStaticMeshComponent::SupportsPartialNavigationUpdate ( ) const
inlineoverrideprotectedvirtual

Does this component support partial navigation updates

Reimplemented from UInstancedStaticMeshComponent.

◆ SupportsRemoveSwap()

virtual bool UHierarchicalInstancedStaticMeshComponent::SupportsRemoveSwap ( ) const
inlineoverridevirtual

Returns true if RemoveAtSwap is enabled. Derived classes may always return true regardless of whether SetRemoveSwapEnabled() was called.

Reimplemented from UInstancedStaticMeshComponent.

◆ UpdateDensityScaling()

void UHierarchicalInstancedStaticMeshComponent::UpdateDensityScaling ( )

Will apply current density scaling, if enabled

◆ UpdateInstanceTransform()

bool UHierarchicalInstancedStaticMeshComponent::UpdateInstanceTransform ( int32  InstanceIndex,
const FTransform NewInstanceTransform,
bool  bWorldSpace,
bool  bMarkRenderStateDirty = false,
bool  bTeleport = false 
)
overridevirtual

Update the transform for the instance specified.

Parameters
InstanceIndexThe index of the instance to update
NewInstanceTransformThe new transform
bWorldSpaceIf true, the new transform is interpreted as a World Space transform, otherwise it is interpreted as Local Space
bMarkRenderStateDirtyIf true, the change should be visible immediately. If you are updating many instances you should only set this to true for the last instance.
bTeleportWhether or not the instance's physics should be moved normally, or teleported (moved instantly, ignoring velocity).
Returns
True on success.

Reimplemented from UInstancedStaticMeshComponent.

Friends And Related Symbol Documentation

◆ ALightWeightInstanceStaticMeshManager

Member Data Documentation

◆ AccumulatedNavigationDirtyArea

FBox UHierarchicalInstancedStaticMeshComponent::AccumulatedNavigationDirtyArea
mutableprotected

◆ AccumulatedNavigationDirtyAreas

TArray<FBox> UHierarchicalInstancedStaticMeshComponent::AccumulatedNavigationDirtyAreas
mutableprotected

◆ BuildTreeAsyncTasks

FGraphEventArray UHierarchicalInstancedStaticMeshComponent::BuildTreeAsyncTasks
protected

◆ FClusterBuilder

◆ FInstancedLightMap2D

friend UHierarchicalInstancedStaticMeshComponent::FInstancedLightMap2D
protected

◆ FInstancedShadowMap2D

friend UHierarchicalInstancedStaticMeshComponent::FInstancedShadowMap2D
protected

◆ FStaticLightingTextureMapping_InstancedStaticMesh

friend UHierarchicalInstancedStaticMeshComponent::FStaticLightingTextureMapping_InstancedStaticMesh
protected

◆ ViewRelevanceType

EHISMViewRelevanceType UHierarchicalInstancedStaticMeshComponent::ViewRelevanceType = EHISMViewRelevanceType::HISM
protected

The documentation for this class was generated from the following files: