Unreal Engine 4 Documentation > Unreal Engine API Reference > Runtime > Engine > Components > UHierarchicalInstancedStaticMeshComponent

UHierarchicalInstancedStaticMeshComponent

Inheritance Hierarchy

Syntax

class UHierarchicalInstancedStaticMeshComponent : public UInstancedStaticMeshComponent

Variables

Name Description

Protected variable

FBox

 

AccumulatedNavigationDirtyArea

Protected variable

friend

 

FInstancedLightMap2D

Protected variable

friend

 

FInstancedShadowMap2D

Protected variable

friend

 

FStaticLightingTextureMapping_InstancedStaticMesh

Destructors

No destructors are accessible with public or protected access.

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

 

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
)

Public function

void

 

BuildTreeAsync()

Public function

int32

 

DesiredInstancesPerLeaf()

Heuristic for the number of leaves in the tree

Protected function

void

 

FlushAccumulatedNavigationUpdates()

Public function

void

 

FlushAsyncBuildInstanceBufferTask()

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

 

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

 

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

 

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