Language:
Discover
By Skill Level
By Category

UHierarchicalInstancedStaticMeshComponent

Choose your OS:

Inheritance Hierarchy

Syntax

class UHierarchicalInstancedStaticMeshComponent : public UInstancedStaticMeshComponent

Variables

Name Description

Protected variable

FBox

 

AccumulatedNavigationDirtyArea

Public variable

bool

 

bAutoRebuildTreeOnInstanceChanges

Public variable

bool

 

bConcurrentRemoval

Public variable

bool

 

bDisableCollision

Public variable

bool

 

bDiscardAsyncBuildResults

Public variable

uint32 : 1

 

bEnableDensityScaling

Enable for detail meshes that don't really affect the game.

Public variable

bool

 

bIsAsyncBuilding

Public variable

FBox

 

BuiltInstanceBounds

Bounding box of any built instances (cached from the ClusterTree)

Public variable

FBoxSphereBound ...

 

CacheMeshExtendedBounds

The last mesh bounds that was cache.

Public variable

TSharedPtr < TAr ...

 

ClusterTreePtr

Public variable

TBitArray

 

ExcludedDueToDensityScaling

Which instances have been removed by foliage density scaling?

Protected variable

friend

 

FInstancedLightMap2D

Protected variable

friend

 

FInstancedShadowMap2D

Protected variable

friend

 

FStaticLightingTextureMapping_InstancedStaticMesh

Public variable

int32

 

NumBuiltInstances

The number of instances in the ClusterTree. Subsequent instances will always be rendered.

Public variable

int32

 

NumBuiltRenderInstances

Normally equal to NumBuiltInstances, but can be lower if density scaling is in effect.

Public variable

int32

 

OcclusionLayerNumNodes

The number of nodes in the occlusion layer.

Public variable

TArray < int32 >

 

SortedInstances

Table for remaping instances from cluster tree to PerInstanceSMData order.

Public variable

FBox

 

UnbuiltInstanceBounds

Bounding box of any unbuilt instances.

Public variable

TArray < FBox >

 

UnbuiltInstanceBoundsList

Bounds of each individual unbuilt instance, used for LOD calculation.

Public variable

TArray < int32 >

 

UnbuiltInstanceIndexList

Instance Index of each individual unbuilt instance, used in unbuilt rendering during a wait for the build.

Constructors

Name Description

Public function

UHierarchicalInstancedStaticMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

Destructors

Functions

Name Description

Public function

void

 

AcceptPrebuiltTree

(
    TArray < FClusterNode >& InClusterT...,
    int InOcclusionLayerNumNodes
)

Protected function

float

 

ActualInstancesPerLeaf()

Average number of instances per leaf

Public function

void

 

ApplyBuildTreeAsync

(
    ENamedThreads::Type CurrentThread,
    const FGraphEventRef & MyCompletion...,
    TSharedRef < FClusterBuilder, ESPMod ...,
    double StartTime
)

Apply the results of the async build.

Protected function

void

 

BuildTree()

Public function Static

void

 

BuildTreeAnyThread

(
    TArray < FMatrix >& InstanceTransfo...,
    const FBox & MeshBox,
    TArray < FClusterNode >& OutCluster...,
    TArray < int32 >& OutSortedInstance...,
    TArray < int32 >& OutInstanceReorde...,
    int32 & OutOcclusionLayerNum,
    int32 MaxInstancesPerLeaf
)

Protected function

void

 

BuildTreeAsync()

Public function

bool

 

BuildTreeIfOutdated

(
    bool Async,
    bool ForceUpdate
)

Public function

int32

 

DesiredInstancesPerLeaf()

Heuristic for the number of leaves in the tree

Protected function

void

 

FlushAccumulatedNavigationUpdates()

Public function

int32

 

GetOverlappingBoxCount

(
    const FBox & Box
)

Get the number of instances that overlap a given box

Public function

void

 

GetOverlappingBoxTransforms

(
    const FBox & Box,
    TArray < FTransform >& OutTransform...
)

Get the transforms of instances inside the provided box

Public function

int32

 

GetOverlappingSphereCount

(
    const FSphere & Sphere
)

Get the number of instances that overlap a given sphere

Protected function

int32

 

GetVertsForLOD

(
    int32 LODIndex
)

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

Public function

bool

 

IsAsyncBuilding()

Public function

bool

 

IsTreeFullyBuilt()

Protected function

void

 

PostBuildStats()

For testing, prints some stats after any kind of build

Protected function

void

 

RemoveInstanceInternal

(
    int32 InstanceIndex
)

Removes a single instance without extra work such as rebuilding the tree or marking render state dirty.

Public function

bool

 

RemoveInstances

(
    const TArray < int32 >& InstancesTo...
)

Removes all the instances with indices specified in the InstancesToRemove array.

Overridden from UInstancedStaticMeshComponent

Name Description

Public function Virtual

int32

 

AddInstance

(
    const FTransform & InstanceTransfor...
)

UInstancedStaticMesh interface.

Public function Virtual

void

 

ApplyComponentInstanceData

(
    FInstancedStaticMeshComponentInstan...
)

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

Public function Virtual

void

 

ClearInstances()

Clear all instances being rendered by this component.

Public function Virtual

TArray < int3 ...

 

GetInstancesOverlappingBox

(
    const FBox & Box,
    bool bBoxInWorldSpace
)

Returns the instances with instance bounds overlapping the specified box.

Public function Virtual

TArray < int3 ...

 

GetInstancesOverlappingSphere

(
    const FVector & Center,
    float Radius,
    bool bSphereInWorldSpace
)

Returns the instances with instance bounds overlapping the specified sphere.

Protected function Virtual

void

 

GetNavigationPerInstanceTransforms

(
    const FBox & AreaBox,
    TArray < FTransform >& InstanceData
)

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

Protected function Virtual

void

 

PartialNavigationUpdate

(
    int32 InstanceIdx
)

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

Public function Virtual

bool

 

RemoveInstance

(
    int32 InstanceIndex
)

Remove the instance specified.

Public function Virtual

bool

 

UpdateInstanceTransform

(
    int32 InstanceIndex,
    const FTransform & NewInstanceTrans...,
    bool bWorldSpace,
    bool bMarkRenderStateDirty,
    bool bTeleport
)

Update the transform for the instance specified.

True on success.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Overridden from UActorComponent

Name Description

Public function Virtual

bool

 

ShouldCreatePhysicsState()

Return true if CreatePhysicsState() should be called.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent & Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostLoad()

WITH_EDITOR.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

Begin UObject Interface.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/HierarchicalInstancedStaticMeshComponent.h