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

 

bCanEnableDensityScaling

In Editor mode we might disable the density scaling for edition

Public variable

bool

 

bConcurrentChanges

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

Protected variable

FGraphEventArra ...

 

BuildTreeAsyncTasks

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

float

 

CurrentDensityScaling

Current value of density scaling applied to this component.

Protected variable

friend

 

FInstancedLightMap2D

Protected variable

friend

 

FInstancedShadowMap2D

Protected variable

friend

 

FStaticLightingTextureMapping_InstancedStaticMesh

Public variable

int32

 

InstanceCountToRender

Instances to render (including removed one until the build is complete)

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.

Constructors

Name Description

Public function

UHierarchicalInstancedStaticMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

Destructors

Functions

Name Description

Public function

void

 

AcceptPrebuiltTree

(
    TArray < FClusterNode >& InClusterT...,
    int32 InOcclusionLayerNumNodes,
    int32 InNumBuiltRenderInstances
)

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

Public function

bool

 

RemoveInstances

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

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

Protected function

void

 

RemoveInstancesInternal

(
    const int32 * InstanceIndices,
    int32 Num
)

Removes specified instances

Protected function

void

 

SetPerInstanceLightMapAndEditorData

(
    FStaticMeshInstanceData & PerInstan...,
    const TArray < TRefCountPtr < HHitPro ...
)

Public function

void

 

UpdateDensityScaling()

Will apply current density scaling, if enabled

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.

Public function Virtual

int32

 

GetNumRenderInstances()

Number of instances in the render-side instance buffer.

Protected function Virtual

void

 

OnPostLoadPerInstanceData()

Creates rendering buffer from serialized data, if any

Protected function Virtual

void

 

PartialNavigationUpdate

(
    int32 InstanceIdx
)

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

Public function Virtual

void

 

PreAllocateInstancesMemory

(
    int32 AddedInstanceCount
)

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

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

 

GetResourceSizeEx

(
    FResourceSizeEx & CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

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

 

PreSave

(
    const ITargetPlatform * TargetP...
)

Begin UObject Interface.

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/HierarchicalInstancedStaticMeshComponent.h