UGeometryCollectionComponent

GeometryCollectionComponent

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

GeometryCollectionEngine

Header

/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Public/GeometryCollection/GeometryCollectionComponent.h

Include

#include "GeometryCollection/GeometryCollectionComponent.h"

Syntax

class UGeometryCollectionComponent :
    public UMeshComponent,
    public IChaosNotifyHandlerInterface

Remarks

GeometryCollectionComponent

Variables

Name Description

Public variable

int32

 

BaseRigidBodyIndex

Protected variable

bool

 

bEnableAbandonAfterLevel

Enables use of ReplicationAbandonClusterLevel to stop providing network updates to clients when the updated particle is of a level higher then specified.

Protected variable

bool

 

bEnableReplication

Per-instance override to enable/disable replication for the geometry collection

Public variable

bool

 

bForceMotionBlur

If ForceMotionBlur is on, motion blur will always be active, even if the GeometryCollection is at rest.

Public variable

bool

 

bNotifyBreaks

If true, this component will generate breaking events that other systems may subscribe to.

Public variable

bool

 

bNotifyCollisions

If true, this component will generate collision events that other systems may subscribe to.

Public variable

bool

 

bNotifyRemovals

If true, this component will generate removal events that other systems may subscribe to.

Public variable

bool

 

bNotifyTrailing

If true, this component will generate trailing events that other systems may subscribe to.

Protected variable

bool

 

bShowBoneColors

Display Bone Colors instead of assigned materials

Public variable

bool

 

bUseSizeSpecificDamageThreshold

Damage threshold for clusters at different levels.

Public variable

FGeomComponentC...

 

CacheParameters

Public variable

bool

 

CachePlayback

Public variable

TObjectPtr< ACh...

 

ChaosSolverActor

Chaos RBD Solver override. Will use the world's default solver actor if null.

Public variable

int32

 

ClusterGroupIndex

Maximum level for cluster breaks.

Public variable

int32

 

CollisionGroup

Public variable

float

 

CollisionSampleFraction

Fraction of collision sample particles to keep

Public variable

TArray< float >

 

DamageThreshold

Public variable

float

 

DesiredCacheTime

Public variable

TArray< bool >

 

DisabledFlags

Mirrored from the proxy on a sync TManagedArray RigidBodyIds;

Public variable

bool

 

EnableClustering

Public variable

FVector

 

InitialAngularVelocity

Public variable

TArray< TObject...

 

InitializationFields

Public variable

ESimulationInit...

 

InitializationState

Public variable

FVector

 

InitialLinearVelocity

Public variable

EInitialVelocit...

 

InitialVelocityType

Public variable

int32

 

MaxClusterLevel

Maximum level for cluster breaks.

Public variable

FNotifyGeometry...

 

NotifyGeometryCollectionPhysicsLoadingStateChange

Public variable

FNotifyGeometry...

 

NotifyGeometryCollectionPhysicsStateChange

Public variable

int32

 

NumParticlesAdded

Public variable

EObjectStateTyp...

 

ObjectType

ObjectType defines how to initialize the rigid objects state, Kinematic, Sleeping, Dynamic.

Public variable

FOnChaosBreakEv...

 

OnChaosBreakEvent

Public variable

FOnChaosPhysics...

 

OnChaosPhysicsCollision

Public variable

FOnChaosRemoval...

 

OnChaosRemovalEvent

Public variable

TObjectPtr< UPh...

 

PhysicalMaterialOverride

Protected variable

FGeometryCollec...

 

RepData

Protected variable

int32

 

ReplicationAbandonClusterLevel

If replicating - the cluster level to stop sending corrections for geometry collection chunks.

Public variable

TObjectPtr< con...

 

RestCollection

Public variable

TArray< FTransf...

 

RestTransforms

Optional transforms to initialize scene proxy if difference from the RestCollection.

Constructors

Name Description

Public function

UGeometryCollectionComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

ApplyKinematicField

(
    float Radius,
    FVector Position
)

SetDynamicState This function will dispatch a command to the physics thread to apply a kinematic to dynamic state change for the geo collection particles within the field.

Public function

void

 

ApplyPhysicsField

(
    bool Enabled,
    EGeometryCollectionPhysicsTypeEnum ...,
    UFieldSystemMetaData* MetaData,
    UFieldNodeBase* Field
)

AddPhysicsField This function will dispatch a command to the physics thread to apply a generic evaluation of a user defined transient field network.

Protected function

void

 

CalculateGlobalMatrices()

Protected function

void

 

CalculateLocalBounds()

Public function

void

 

DispatchBreakEvent

(
    const FChaosBreakEvent& Event
)

Protected function

void

 

DispatchFieldCommand

(
    const FFieldSystemCommand& InComma...
)

Issue a field command for the physics thread

Public function

void

 

DispatchRemovalEvent

(
    const FChaosRemovalEvent& Event
)

Public function

FScopedColor...

 

EditBoneSelection()

Public function

FGeometryCol...

 

EditRestCollection

Public function Const

int32

 

EmbeddedIndexToTransformIndex

(
    const UInstancedStaticMeshComponent...,
    int32 InstanceIndex
)

Public function

void

 

EnableTransformSelectionMode

(
    bool bEnable
)

Enable/disable the scene proxy per transform selection mode.

Public function

void

 

ForceRenderUpdateConstantData()

Force render after constant data changes (such as visibility, or hitproxy subsections).

Public function

void

 

ForceRenderUpdateDynamicData()

Force render after dynamic data changes (such as transforms). Will also work while paused.

Public function Const

const TManag...

 

GetBoneColorArray()

Public function

TManagedArra...

 

GetBoneColorArrayCopyOnWrite()

Public function Const

const TManag...

 

GetBoneColorArrayRest()

Public function Const

const TManag...

 

GetBoneMapArray()

Public function

TManagedArra...

 

GetBoneMapArrayCopyOnWrite()

Public function Const

const TManag...

 

GetBoneMapArrayRest()

Public function Const

const TManag...

 

GetBoneNameArray()

Transform group.

Public function

TManagedArra...

 

GetBoneNameArrayCopyOnWrite()

Public function Const

const TManag...

 

GetBoneNameArrayRest()

Public function Const

const int

 

GetBoneSelectedMaterialID()

Public function Const

const TManag...

 

GetBoundingBoxArray()

Public function

TManagedArra...

 

GetBoundingBoxArrayCopyOnWrite()

Public function Const

const TManag...

 

GetBoundingBoxArrayRest()

Public function Const

const TManag...

 

GetChildrenArray()

Public function

TManagedArra...

 

GetChildrenArrayCopyOnWrite()

Public function Const

const TManag...

 

GetChildrenArrayRest()

Public function Const

const TManag...

 

GetColorArray()

Public function

TManagedArra...

 

GetColorArrayCopyOnWrite()

Public function Const

const TManag...

 

GetColorArrayRest()

Public function Const

const TArray...

 

GetDisabledFlags()

Public function Const

bool

 

GetEnableBoneSelection()

Public function Const

const TManag...

 

GetExemplarIndexArray()

Public function

TManagedArra...

 

GetExemplarIndexArrayCopyOnWrite()

Public function Const

const TManag...

 

GetExemplarIndexArrayRest()

Public function Const

const TManag...

 

GetFaceCountArray()

Public function

TManagedArra...

 

GetFaceCountArrayCopyOnWrite()

Public function Const

const TManag...

 

GetFaceCountArrayRest()

Public function Const

const TManag...

 

GetFaceStartArray()

Public function

TManagedArra...

 

GetFaceStartArrayCopyOnWrite()

Public function Const

const TManag...

 

GetFaceStartArrayRest()

Public function

const TArray...

 

GetGlobalMatrices()

Used by Niagara DI to query global matrices rather than recalculating them again

Public function Const

const TArray...

 

GetHighlightedBones()

Public function Const

const TManag...

 

GetIndicesArray()

Faces Group.

Public function

TManagedArra...

 

GetIndicesArrayCopyOnWrite()

Public function Const

const TManag...

 

GetIndicesArrayRest()

Protected function

void

 

GetInitializationCommands

(
    TArray< FFieldSystemCommand >& Com...
)

Combine the commands from the input field assets

Public function Const

FPhysScene_C...

 

GetInnerChaosScene()

Public function Const

const TManag...

 

GetInnerRadiusArray()

Public function

TManagedArra...

 

GetInnerRadiusArrayCopyOnWrite()

Public function Const

const TManag...

 

GetInnerRadiusArrayRest()

Public function Const

bool

 

GetIsObjectDynamic()

Public function

bool

 

GetIsObjectLoading()

Public function Const

const TManag...

 

GetMaterialIDArray()

Public function

TManagedArra...

 

GetMaterialIDArrayCopyOnWrite()

Public function Const

const TManag...

 

GetMaterialIDArrayRest()

Public function Const

const TManag...

 

GetMaterialIndexArray()

Public function

TManagedArra...

 

GetMaterialIndexArrayCopyOnWrite()

Public function Const

const TManag...

 

GetMaterialIndexArrayRest()

Public function Const

const TManag...

 

GetNormalArray()

Public function

TManagedArra...

 

GetNormalArrayCopyOnWrite()

Public function Const

const TManag...

 

GetNormalArrayRest()

Public function Const

int32

 

GetNumElements

(
    FName Group
)

API for getting at geometry collection data

Public function Const

const TManag...

 

GetOuterRadiusArray()

Public function

TManagedArra...

 

GetOuterRadiusArrayCopyOnWrite()

Public function Const

const TManag...

 

GetOuterRadiusArrayRest()

Public function Const

const TManag...

 

GetParentArray()

Public function

TManagedArra...

 

GetParentArrayCopyOnWrite()

Public function Const

const TManag...

 

GetParentArrayRest()

Public function Const

UPhysicalMat...

 

GetPhysicalMaterial()

Gets the physical material to use for this geometry collection, taking into account instance overrides and render materials

Public function Const

const FGeome...

 

GetPhysicsProxy()

Public function

FGeometryCol...

 

GetPhysicsProxy()

Public function Const

AChaosSolver...

 

GetPhysicsSolverActor()

Public function Const

const UGeome...

 

GetRestCollection()

Public function Const

const TManag...

 

GetSectionsArray()

Material Group.

Public function

TManagedArra...

 

GetSectionsArrayCopyOnWrite()

Public function Const

const TManag...

 

GetSectionsArrayRest()

Public function Const

const TArray...

 

GetSelectedBones()

Public function Const

bool

 

GetShowBoneColors()

Public function Const

const TManag...

 

GetSimulationTypeArray()

Public function

TManagedArra...

 

GetSimulationTypeArrayCopyOnWrite()

Public function Const

const TManag...

 

GetSimulationTypeArrayRest()

Public function Const

const TManag...

 

GetStatusFlagsArray()

Public function

TManagedArra...

 

GetStatusFlagsArrayCopyOnWrite()

Public function Const

const TManag...

 

GetStatusFlagsArrayRest()

Public function Const

bool

 

GetSuppressSelectionMaterial()

Public function Const

const TManag...

 

GetTangentUArray()

Public function

TManagedArra...

 

GetTangentUArrayCopyOnWrite()

Public function Const

const TManag...

 

GetTangentUArrayRest()

Public function Const

const TManag...

 

GetTangentVArray()

Public function

TManagedArra...

 

GetTangentVArrayCopyOnWrite()

Public function Const

const TManag...

 

GetTangentVArrayRest()

Public function Const

const TManag...

 

GetTransformArray()

Public function

TManagedArra...

 

GetTransformArrayCopyOnWrite()

Public function Const

const TManag...

 

GetTransformArrayRest()

Public function Const

const TManag...

 

GetTransformIndexArray()

Geometry Group.

Public function

TManagedArra...

 

GetTransformIndexArrayCopyOnWrite()

Public function Const

const TManag...

 

GetTransformIndexArrayRest()

Public function Const

const TManag...

 

GetTransformToGeometryIndexArray()

Public function

TManagedArra...

 

GetTransformToGeometryIndexArrayCopyOnWrite()

Public function Const

const TManag...

 

GetTransformToGeometryIndexArrayRest()

Public function Const

const TManag...

 

GetUVsArray()

Public function

TManagedArra...

 

GetUVsArrayCopyOnWrite()

Public function Const

const TManag...

 

GetUVsArrayRest()

Public function Const

const TManag...

 

GetVertexArray()

Vertices Group.

Public function

TManagedArra...

 

GetVertexArrayCopyOnWrite()

Public function Const

const TManag...

 

GetVertexArrayRest()

Public function Const

const TManag...

 

GetVertexCountArray()

Public function

TManagedArra...

 

GetVertexCountArrayCopyOnWrite()

Public function Const

const TManag...

 

GetVertexCountArrayRest()

Public function Const

const TManag...

 

GetVertexStartArray()

Public function

TManagedArra...

 

GetVertexStartArrayCopyOnWrite()

Public function Const

const TManag...

 

GetVertexStartArrayRest()

Public function Const

const TManag...

 

GetVisibleArray()

Public function

TManagedArra...

 

GetVisibleArrayCopyOnWrite()

Public function Const

const TManag...

 

GetVisibleArrayRest()

Protected function Const

void

 

InitConstantData

(
    FGeometryCollectionConstantData...
)

Populate the static geometry structures for the render thread.

Protected function

FGeometryCol...

 

InitDynamicData

(
    bool bInitialization
)

Populate the dynamic particle data for the render thread.

Public function

void

 

InitializeEmbeddedGeometry()

Update component structure to reflect any changes to the embedded geometry

Public function Virtual

void

 

NotifyBreak

(
    const FChaosBreakEvent& Event
)

Overrideable native notification

Public function Virtual

void

 

NotifyRemoval

(
    const FChaosRemovalEvent& Event
)

Overrideable native notification

Protected function

void

 

OnRep_RepData

(
    const FGeometryCollectionRepData& ...
)

Called on non-authoritative clients when receiving new repdata from the server

Public function

void

 

ReceivePhysicsCollision

(
    const FChaosPhysicsCollisionInfo& ...
)

Public function

void

 

RefreshEmbeddedGeometry()

Update instanced static mesh components to reflect internal embedded geometry state.

Public function

void

 

RegisterAndInitializePhysicsProxy()

Protected function

void

 

RegisterForEvents()

Public function

void

 

ResetBoneColorArrayDynamic()

Public function

void

 

ResetBoneMapArrayDynamic()

Public function

void

 

ResetBoneNameArrayDynamic()

Public function

void

 

ResetBoundingBoxArrayDynamic()

Public function

void

 

ResetChildrenArrayDynamic()

Public function

void

 

ResetColorArrayDynamic()

Protected function

void

 

ResetDynamicCollection()

Reset the dynamic collection from the current rest state.

Public function

void

 

ResetExemplarIndexArrayDynamic()

Public function

void

 

ResetFaceCountArrayDynamic()

Public function

void

 

ResetFaceStartArrayDynamic()

Public function

void

 

ResetIndicesArrayDynamic()

Public function

void

 

ResetInnerRadiusArrayDynamic()

Public function

void

 

ResetMaterialIDArrayDynamic()

Public function

void

 

ResetMaterialIndexArrayDynamic()

Public function

void

 

ResetNormalArrayDynamic()

Public function

void

 

ResetOuterRadiusArrayDynamic()

Public function

void

 

ResetParentArrayDynamic()

Public function

void

 

ResetSectionsArrayDynamic()

Public function

void

 

ResetSimulationTypeArrayDynamic()

Public function

void

 

ResetStatusFlagsArrayDynamic()

Public function

void

 

ResetTangentUArrayDynamic()

Public function

void

 

ResetTangentVArrayDynamic()

Public function

void

 

ResetTransformArrayDynamic()

Public function

void

 

ResetTransformIndexArrayDynamic()

Public function

void

 

ResetTransformToGeometryIndexArrayDynamic()

Public function

void

 

ResetUVsArrayDynamic()

Public function

void

 

ResetVertexArrayDynamic()

Public function

void

 

ResetVertexCountArrayDynamic()

Public function

void

 

ResetVertexStartArrayDynamic()

Public function

void

 

ResetVisibleArrayDynamic()

Public function

void

 

SelectEmbeddedGeometry()

Propagate bone selection to embedded geometry components.

Public function

void

 

SetDynamicState

(
    const Chaos::EObjectStateType& New...
)

Set the dynamic state for all bodies in the DynamicCollection.

Public function

void

 

SetEmbeddedGeometrySelectable

(
    bool bSelectableIn
)

Public function

void

 

SetInitialClusterBreaks

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

Modify DynamicCollection transform hierarchy to effect cluster breaks releasing the specified indices.

Public function

void

 

SetInitialTransforms

(
    const TArray< FTransform >& Initia...
)

Set transforms for all bodies in the DynamicCollection.

Public function

void

 

SetNotifyBreaks

(
    bool bNewNotifyBreaks
)

Changes whether or not this component will get future break notifications.

Public function

void

 

SetNotifyRemovals

(
    bool bNewNotifyRemovals
)

Changes whether or not this component will get future removal notifications.

Public function

void

 

SetRenderStateDirty()

Public function

void

 

SetRestCollection

(
    const UGeometryCollection* Res...
)

RestCollection

Public function

void

 

SetRestState

(
    TArray< FTransform >&& InRestTrans...
)

#todo should this only be available in editor?

Public function

void

 

SetShowBoneColors

(
    bool ShowBoneColorsIn
)

Protected function

void

 

UpdateBreakEventRegistration()

Protected function

void

 

UpdateRBCollisionEventRegistration()

Protected function

void

 

UpdateRemovalEventRegistration()

Protected function

void

 

UpdateRepData()

Called post solve to allow authoritative components to update their replication data

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

bool

 

CanEditSimulatePhysics()

Determines whether or not the simulate physics setting can be edited interactively on this component

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

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

Public function Virtual Const

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport& GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual Const

FBodyInstanc...

 

GetBodyInstance

(
    FName BoneName,
    bool bGetWelded,
    int32 Index
)

Returns BodyInstance of the component.

Public function Virtual Const

UMaterialInt...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

Public function Virtual

void

 

SetNotifyRigidBodyCollision

(
    bool bNewNotifyRigidBodyCollision
)

Changes the value of bNotifyRigidBodyCollision

Public function Virtual

void

 

SetSimulatePhysics

(
    bool bSimulate
)

Sets whether or not a single body should use physics simulation, or should be 'fixed' (kinematic).

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

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

Public function Virtual Const

FBoxSphereBo...

 

CalcLocalBounds()

Calculate the local bounds of the component.

Public function Virtual Const

bool

 

HasAnySockets()

Returns true if this component has any sockets

Public function Virtual

void

 

OnUpdateTransform

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Native callback when this component is moved

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

BeginPlay()

Used to detach physics objects before simulation begins.

Public function Virtual

void

 

CreateRenderState_Concurrent

(
    FRegisterComponentContext* Con...
)

Used to create any rendering thread information for this component

Public function Virtual

void

 

EndPlay

(
    const EEndPlayReason::Type EndPlayR...
)

Ends gameplay for this component.

Public function Virtual Const

bool

 

HasValidPhysicsState()

Used to check that DestroyPhysicsState() is working correctly

Public function Virtual

void

 

InitializeComponent()

Initializes the component.

Public function Virtual

void

 

OnCreatePhysicsState()

Used to create any physics engine information for this component

Public function Virtual

void

 

OnDestroyPhysicsState()

Used to shut down and physics engine structure for this component

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

SendRenderDynamicData_Concurrent()

Called to send dynamic data for this component to the rendering thread

Public function Virtual Const

bool

 

ShouldCreatePhysicsState()

Return true if CreatePhysicsState() should be called.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetLifetimeReplicatedProps

(
    TArray< FLifetimeProperty >& OutLi...
)

Returns properties that are replicated for the lifetime of the actor channel

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent& Proper...
)

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

Overridden from IChaosNotifyHandlerInterface

Name Description

Public function Virtual

void

 

DispatchChaosPhysicsCollisionBlueprintEvents

(
    const FChaosPhysicsCollisionInfo& ...
)

Implementing classes should override to dispatch whatever blueprint events they choose to offer

Classes

Deprecated Variables

Name Description

Public variable

float

 

AngularEtherDrag_DEPRECATED

Uniform angular ether drag.

Public variable

EClusterConnect...

 

ClusterConnectionType_DEPRECATED

Public variable

float

 

LinearEtherDrag_DEPRECATED

Uniform linear ether drag.

Public variable

TObjectPtr< con...

 

PhysicalMaterial_DEPRECATED

Physical Properties

Public variable

bool

 

Simulating_DEPRECATED