UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PBDRigidClustering.cpp File Reference

Namespaces

namespace  GeometryCollectionPhysicsProxy
 
namespace  GeometryCollectionPhysicsProxy::Private
 
namespace  Chaos
 
namespace  Chaos::CVars
 

Functions

CHAOS_API bool GeometryCollectionPhysicsProxy::Private::BuildGeometryForChildrenOnPT (const FSimulationParameters &Params)
 
template<typename TProxy = FGeometryCollectionPhysicsProxy>
TProxyChaos::GetConcreteProxy (FPBDRigidClusteredParticleHandle *ClusteredParticle)
 
template<typename TProxy = FGeometryCollectionPhysicsProxy>
const TProxyChaos::GetConcreteProxy (const FPBDRigidClusteredParticleHandle *ClusteredParticle)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::CreateClusterParticle"), STAT_CreateClusterParticle, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::AddParticlesToCluster"), STAT_AddParticlesToCluster, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::RemoveParticlesFromCluster"), STAT_RemoveParticlesFromCluster, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::UpdateClusterParticlePropertiesFromChildren"), STAT_UpdateClusterParticlePropertiesFromChildren, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::CreateClusterParticleFromClusterChildren"), STAT_CreateClusterParticleFromClusterChildren, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::UnionClusterGroups"), STAT_UnionClusterGroups, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::DeactivateClusterParticle"), STAT_DeactivateClusterParticle, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::ReleaseClusterParticles(STRAIN)"), STAT_ReleaseClusterParticles_STRAIN, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::ReleaseClusterParticlesNoInternalCluster"), STAT_ReleaseClusterParticlesNoInternalCluster, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::HandleConnectivityOnReleaseClusterParticle"), HandleConnectivityOnReleaseClusterParticle, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::ReleaseClusterParticles(LIST)"), STAT_ReleaseClusterParticles_LIST, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::ReleaseChildrenParticleAndParents"), ReleaseChildrenParticleAndParents, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::AdvanceClustering"), STAT_AdvanceClustering, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::Update Impulse from Strain"), STAT_UpdateImpulseStrain, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::Update Dirty Impulses"), STAT_UpdateDirtyImpulses, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("FRigidClustering::CleanupInternalClustersForProxy"), STAT_CleanupInternalClustersForProxy, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("BreakingModel_AllParticles"), STAT_BreakingModel_AllParticles, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("BreakingModel"), STAT_BreakingModel, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("FRigidClustering::Visitor"), STAT_ClusterVisitor, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::GetActiveClusterIndex"), STAT_GetActiveClusterIndex, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::GenerateConnectionGraph"), STAT_GenerateConnectionGraph, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::ClearConnectionGraph"), STAT_ClearConnectionGraph, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("ComputeStrainFromCollision"), STAT_ComputeStrainFromCollision, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("ResetCollisionImpulseArray"), STAT_ResetCollisionImpulseArray, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::UpdateConnectivityGraphUsingPointImplicit"), STAT_UpdateConnectivityGraphUsingPointImplicit, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::FixConnectivityGraphUsingDelaunayTriangulation"), STAT_FixConnectivityGraphUsingDelaunayTriangulation, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::UpdateConnectivityGraphUsingDelaunayTriangulation"), STAT_UpdateConnectivityGraphUsingDelaunayTriangulation, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::UpdateConnectivityGraphUsingDelaunayTriangulationWithBoundsOverlaps"), STAT_UpdateConnectivityGraphUsingDelaunayTriangulationWithBoundsOverlaps, STATGROUP_Chaos)
 
 Chaos::DECLARE_CYCLE_STAT (TEXT("TPBDRigidClustering<>::RemoveNodeConnections"), STAT_RemoveNodeConnections, STATGROUP_Chaos)
 
FClusterCreationParameters::EConnectionMethod Chaos::ToInternalConnectionMethod (EClusterUnionMethod InMethod)
 

Variables

FRealSingle Chaos::ClusterDistanceThreshold = 100.f
 
FAutoConsoleVariableRef Chaos::CVarClusterDistance (TEXT("p.ClusterDistanceThreshold"), ClusterDistanceThreshold, TEXT("How close a cluster child must be to a contact to break off"))
 
int32 Chaos::UseConnectivity = 1
 
FAutoConsoleVariableRef Chaos::CVarUseConnectivity (TEXT("p.UseConnectivity"), UseConnectivity, TEXT("Whether to use connectivity graph when breaking up clusters"))
 
bool Chaos::bCheckForInterclusterEdgesOnRelease = true
 
FAutoConsoleVariableRef Chaos::CVarCheckForInterclusterEdgesOnRelease (TEXT("p.Chaos.CheckForInterclusterEdgesOnRelease"), bCheckForInterclusterEdgesOnRelease, TEXT("Whether to check for intercluster edges when removing a child from its parent cluster so that we can add the particle back into a cluster union."))
 
bool Chaos::bOnlyUseInterclusterEdgesAttachedToMainParticles = true
 
FAutoConsoleVariableRef Chaos::CVarOnlyUseInterclusterEdgesAttachedToMainParticles (TEXT("p.Chaos.OnlyUseInterclusterEdgesAttachedToMainParticles"), bOnlyUseInterclusterEdgesAttachedToMainParticles, TEXT("If true, an intercluster edge must be directly attached to a main particle for the particle to remain a part of the cluster union."))
 
int32 Chaos::ComputeClusterCollisionStrains = 1
 
FAutoConsoleVariableRef Chaos::CVarComputeClusterCollisionStrains (TEXT("p.ComputeClusterCollisionStrains"), ComputeClusterCollisionStrains, TEXT("Whether to use collision constraints when processing clustering."))
 
int32 Chaos::DeactivateClusterChildren = 0
 
FAutoConsoleVariableRef Chaos::CVarDeactivateClusterChildren (TEXT("p.DeactivateClusterChildren"), DeactivateClusterChildren, TEXT("If children should be decativated when broken and put into another cluster."))
 
int32 Chaos::UseBoundingBoxForConnectionGraphFiltering = 0
 
FAutoConsoleVariableRef Chaos::CVarUseBoundingBoxForConnectionGraphFiltering (TEXT("p.UseBoundingBoxForConnectionGraphFiltering"), UseBoundingBoxForConnectionGraphFiltering, TEXT("when on, use bounding box overlaps to filter connection during the connection graph generation [def: 0]"))
 
float Chaos::BoundingBoxMarginForConnectionGraphFiltering = 0
 
FAutoConsoleVariableRef Chaos::CVarBoundingBoxMarginForConnectionGraphFiltering (TEXT("p.BoundingBoxMarginForConnectionGraphFiltering"), BoundingBoxMarginForConnectionGraphFiltering, TEXT("when UseBoundingBoxForConnectionGraphFiltering is on, the margin to use for the oevrlap test [def: 0]"))
 
int32 Chaos::GraphPropagationBasedCollisionImpulseProcessing = 0
 
FAutoConsoleVariableRef Chaos::CVarGraphPropagationBasedCollisionImpulseProcessing (TEXT("p.GraphPropagationBasedCollisionImpulseProcessing"), GraphPropagationBasedCollisionImpulseProcessing, TEXT("when processing collision impulse toc ompute strain, pick the closest child from the impact point and propagate using the connection graph [def: 0]"))
 
float Chaos::GraphPropagationBasedCollisionFactor = 1
 
FAutoConsoleVariableRef Chaos::CVarGraphPropagationBasedCollisionFactor (TEXT("p.GraphPropagationBasedCollisionFactor"), GraphPropagationBasedCollisionFactor, TEXT("when p.GraphPropagationBasedCollisionImpulseProcessing is on, the percentage [0-1] of remaining damage that is distributed to the connected pieces"))
 
float Chaos::RestoreBreakingMomentumPercent = .5
 
FAutoConsoleVariableRef Chaos::CVarRestoreBreakingMomentumPercent (TEXT("p.RestoreBreakingMomentumPercent"), RestoreBreakingMomentumPercent, TEXT("When a rigid cluster is broken, objects that its in contact with will receive an impulse to restore this percent of their momentum prior to the break."))
 
int32 Chaos::ClusteringParticleReleaseThrottlingMinCount = INDEX_NONE
 
FAutoConsoleVariableRef Chaos::CVarClusteringParticleReleaseThrottlingMinCount (TEXT("p.Clustering.ParticleReleaseThrottlingMinCount"), ClusteringParticleReleaseThrottlingMinCount, TEXT("Minimum number of active geometry collection to reach before clustering start to disable a percentage of the released particle per cluster"))
 
int32 Chaos::ClusteringParticleReleaseThrottlingMaxCount = INDEX_NONE
 
FAutoConsoleVariableRef Chaos::CVarClusteringParticleReleaseThrottlingMaxCount (TEXT("p.Clustering.ParticleReleaseThrottlingMaxCount"), ClusteringParticleReleaseThrottlingMaxCount, TEXT("Maximum number of active geometry collection to reach before all released clustering disable all released particle instantly"))
 
bool Chaos::CVars::bChaosEnableOverrideSingleParticleTypeToCluster = false
 
int32 Chaos::UnionsHaveCollisionParticles = 0
 
FAutoConsoleVariableRef Chaos::CVarUnionsHaveCollisionParticles (TEXT("p.UnionsHaveCollisionParticles"), UnionsHaveCollisionParticles, TEXT(""))
 
FAutoConsoleVariableRef Chaos::CVarBreakMode (TEXT("p.chaos.clustering.breakonlystrained"), GClusterBreakOnlyStrained, TEXT("If enabled we only process strained clusters for breaks, if disabled all clusters are traversed and checked"))
 
FAutoConsoleVariableRef Chaos::CVarPerAdvanceBreaksAllowed (TEXT("p.Chaos.Clustering.PerAdvanceBreaksAllowed"), GPerAdvanceBreaksAllowed, TEXT("Number of breaks allowed to occur for each invocation of AdvanceClustering"))
 
FAutoConsoleVariableRef Chaos::CVarPerAdvanceBreaksRescheduleLimit (TEXT("p.Chaos.Clustering.PerAdvanceBreaksRescheduleLimit"), GPerAdvanceBreaksRescheduleLimit, TEXT("Number of breaks allowed to be rescheduled for next frame if any "))
 
FAutoConsoleVariableRef Chaos::CVarDumpClusterAndReleaseStats (TEXT("p.Chaos.Clustering.DumpClusterAndReleaseStats"), GDumpClusterAndReleaseStats, TEXT("Report the number of cluster processes and released particles per frame, on/off 1/0"))
 
FRealSingle Chaos::MinImpulseForStrainEval = 980 * 2 * 1.f / 30.f
 
FAutoConsoleVariableRef Chaos::CVarMinImpulseForStrainEval (TEXT("p.chaos.MinImpulseForStrainEval"), MinImpulseForStrainEval, TEXT("Minimum accumulated impulse before accumulating for strain eval "))
 
bool Chaos::bUseContactSpeedForStrainThreshold = true
 
FAutoConsoleVariableRef Chaos::CVarUseContactSpeedForStrainEval (TEXT("p.chaos.UseContactSpeedForStrainEval"), bUseContactSpeedForStrainThreshold, TEXT("Whether to use contact speed to discard contacts when updating cluster strain (true: use speed, false: use impulse)"))
 
FRealSingle Chaos::MinContactSpeedForStrainEval = 1.0f
 
FAutoConsoleVariableRef Chaos::CVarMinContactSpeedForStrainEval (TEXT("p.chaos.MinContactSpeedForStrainEval"), MinContactSpeedForStrainEval, TEXT("Minimum speed at the contact before accumulating for strain eval "))