Navigation
API > API/Runtime > API/Runtime/Chaos > API/Runtime/Chaos/PhysicsProxy
Inheritance Hierarchy
- IPhysicsProxyBase
- TPhysicsProxy
- FGeometryCollectionPhysicsProxy
References
| Module | Chaos |
| Header | /Engine/Source/Runtime/Experimental/Chaos/Public/PhysicsProxy/GeometryCollectionPhysicsProxy.h |
| Include | #include "PhysicsProxy/GeometryCollectionPhysicsProxy.h" |
Syntax
class FGeometryCollectionPhysicsProxy : public TPhysicsProxy< FGeometryCollectionPhysicsProxy, FStubGeometryCollectionData, FGeometryCollectionProxyTimestamp >
Remarks
Class to manage sharing data between the game thread and the simulation thread (which may not be different than the game thread) for a `FGeometryDynamicCollection_.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FGeometryCollectionPhysicsProxy
(
UObject* InOwner, |
InOwner_InDynamicCollection_ game thread owned geometry collection. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddForceCallback
(
FParticlesType& InParticles, |
||
| Chaos::FVec3f | AdjustInertiaForScale
(
const Chaos::FVec3f& Inertia |
Adjust inertia to account for per component scale properties ( from material override and world transform scale ) | |
| float | AdjustMassForScale
(
float Mass |
Adjust scalar mass to account for per component scale properties ( from material override and world transform scale ) | |
| void | ApplyAngularVelocity_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | ApplyBreakingAngularVelocity_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | ApplyBreakingLinearVelocity_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | ApplyExternalStrain_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | ApplyForceAt_External
(
FVector Force, |
||
| void | ApplyImpulseAt_External
(
FVector Force, |
||
| void | ApplyInternalStrain_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | ApplyLinearVelocity_External
(
FGeometryCollectionItemIndex ItemIndex, |
||
| void | BindParticleCallbackMapping
(
Chaos::TArrayCollectionArray< PhysicsProxyWrapper >& PhysicsProxyReverseMap, |
||
| void | |||
| void | BreakClusters_External
(
TArray< FGeometryCollectionItemIndex >&& ItemIndices |
||
| void | BufferCommand
(
Chaos::FPBDRigidsSolver* RigidsSolver, |
Enqueue a field Command_ to be processed by ProcessCommands() or `FieldForcesUpdateCallback(). |
|
| void | |||
| void | BufferPhysicsResults_External
(
Chaos::FDirtyGeometryCollectionData& BufferData |
Push GT state into the `PhysToGameInterchange_ for async physics | |
| void | BufferPhysicsResults_Internal
(
Chaos::FPBDRigidsSolver* CurrentSolver, |
Push PT state into the `PhysToGameInterchange_. | |
| Chaos::FPBDRigidClusteredParticleHandle * | BuildClusters_Internal
(
const uint32 CollectionClusterIndex, |
Build a physics thread cluster parent particle. | |
| Chaos::TPBDGeometryCollectionParticleHandle< Chaos::FReal, 3 > * | BuildNonClusters_Internal
(
const uint32 CollectionClusterIndex, |
||
| int32 | CalculateAndSetLevel
(
int32 TransformGroupIdx, |
Traverses the parents of TransformGroupIdx counting number of levels, and sets levels array value for TransformGroupIdx and its parents if not yet initialized. | |
| int32 | CalculateHierarchyLevel
(
const FGeometryDynamicCollection& DynamicCollection, |
Traverses the parents of TransformIndex_ in GeometryCollection_, counting the number of levels until the next parent is `INDEX_NONE_. |
|
| void | Called at the end of `FPBDRigidsSolver::PushPhysicsStateExec()_. | ||
| float | ComputeMaterialBasedDamageThreshold_Internal
(
int32 TransformIndex |
||
| float | ComputeMaterialBasedDamageThreshold_Internal
(
Chaos::FPBDRigidClusteredParticleHandle& ClusteredParticle |
||
| float | ComputeUserDefinedDamageThreshold_Internal
(
int32 TransformIndex |
Compute user defined damage threshold for a specific transform this account for component level damage threshold as well as size specific ones | |
| EPhysicsProxyType | ConcreteType () |
||
| void | |||
| void | CreateNonClusteredParticles
(
Chaos::FPBDRigidsSolver* RigidsSolver, |
||
| void | CreateRigidBodyCallback
(
FParticlesType& InOutParticles |
||
| void |
DirtyAllParticles
(
const Chaos::FPBDRigidsSolver& RigidsSolver |
||
| void | DisableCollisionsCallback
(
TSet< TTuple< int32, int32 > >& InPairs |
||
| void | DisableParticles_External
(
TArray< int32 >&& TransformGroupIndices |
||
| void | EndFrameCallback
(
const float InDt |
||
| void | FieldForcesUpdateCallback
(
Chaos::FPBDRigidsSolver* RigidSolver |
||
| void | FieldParameterUpdateCallback
(
Chaos::FPBDRigidsSolver* RigidSolver, |
||
| Chaos::FPBDRigidClusteredParticleHandle * | |||
| const TArray< int32 > * | |||
| void | FlipBuffer () |
Does nothing as `BufferPhysicsResults()_ already did this. | |
| TArray< Chaos::FPhysicsObjectHandle > | |||
| TArray< Chaos::FPhysicsObjectHandle > | |||
| const FGeometryCollectionResults * | |||
| FGeometryDynamicCollection & | |||
| TArray< TUniquePtr< FParticle > > & | |||
| void | GetFilteredParticleHandles
(
TArray< Chaos::TGeometryParticleHandle< Chaos::FReal, 3 >* >& Handles, |
Get all the geometry collection particle handles filtered by object state | |
| int32 | GetFromParticleToTransformIndex
(
int32 Index |
||
| FClusterHandle * | |||
| FParticle * | |||
| const FParticle * | |||
| FParticleHandle * | |||
| const FParticleHandle * | |||
| FGeometryCollectionItemIndex | GetInternalClusterParentItemIndex_External
(
int32 ChildTransformIndex |
||
| const FProxyInterpolationBase & | |||
| FProxyInterpolationBase & | |||
| bool | |||
| FGeometryCollectionItemIndex | GetItemIndexFromGTParticle_External
(
const FParticle* GTPParticle |
||
| FGeometryCollectionItemIndex | GetItemIndexFromGTParticleNoInternalCluster_External
(
const FParticle* GTPParticle |
||
| int32 | |||
| int32 | |||
| FClusterHandle * | GetParticle_Internal
(
int32 Index |
||
| const FParticle * | GetParticleByIndex_External
(
int32 Index |
||
| FParticle * | GetParticleByIndex_External
(
int32 Index |
||
| const FParticleHandle * | GetParticleByIndex_Internal
(
int32 Index |
||
| FParticleHandle * | GetParticleByIndex_Internal
(
int32 Index |
||
| const TArray< FClusterHandle * > | GetParticles () |
||
| FGeometryDynamicCollection & | |||
| Chaos::FPhysicsObjectHandle | GetPhysicsObjectByIndex
(
int32 Index |
||
| const FTransform & | |||
| void | GetRelevantParticleHandles
(
TArray< Chaos::TGeometryParticleHandle< Chaos::FReal, 3 >* >& Handles, |
* Get all the geometry collection particle handles based on the processing resolution | |
| EReplicationMode | |||
| const FSimulationParameters & | |||
| FSimulationParameters & | |||
| SOLVER_TYPE * | GetSolver () |
Proxy publics | |
| FClusterHandle * | GetSolverClusterHandle_Internal
(
int32 Index |
||
| TArray< FClusterHandle * > & | |||
| TArray< FClusterHandle * > & | |||
| int32 | GetTransformGroupIndexFromHandle
(
const FParticleHandle* Handle |
||
| void | GetTransformGroupIndicesFromHandles
(
const TArray< FParticleHandle* > Handles, |
||
| FName | GetTransformName_External
(
FGeometryCollectionItemIndex ItemIndex |
||
| TArray< TUniquePtr< FParticle > > & | |||
| const TArray< FClusterHandle * > | |||
| const FTransform & | |||
| void | Initialize
(
Chaos::FPBDRigidsEvolutionBase* Evolution |
Construct `PTDynamicCollection_, copying attributes from the game thread, and prepare for simulation. | |
| void | InitializeBodiesPT
(
Chaos::FPBDRigidsSolver* RigidsSolver, |
Finish initialization on the physics thread. | |
| void | InitializeDynamicCollection
(
FGeometryDynamicCollection& DynamicCollection, |
||
| void | InitializeSharedCollisionStructures
(
Chaos::FErrorReporter& ErrorReporter, |
NOTE - Making any changes to data stored on the rest collection below MUST be accompanied by a rotation of the DDC key in FDerivedDataGeometryCollectionCooker::GetVersionString | |
| bool | IsDirty () |
||
| bool | |||
| bool | |||
| bool | IsSimulating () |
||
| Chaos::FParticleData * | NewData () |
Pushes current game thread particle state into the `GameToPhysInterchange_. | |
| void | |||
| void | OnRemoveFromSolver
(
Chaos::FPBDRigidsSolver* RBDSolver |
||
| void | |||
| void | PrepareBufferData
(
Chaos::FDirtyGeometryCollectionData& BufferData, |
||
| bool | PullFromPhysicsState
(
const Chaos::FDirtyGeometryCollectionData& BufferData, |
Pulls data out of the PhysToGameInterchange and updates `GTDynamicCollection_. | |
| void | PushStateOnGameThread
(
Chaos::FPBDRigidsSolver* InSolver |
Push data from the game thread to the physics thread | |
| void | Apply the state changes on the physics thread | ||
| void | |||
| bool | RebaseParticleGameThreadCollectionTransformOnNewWorldTransform_External
(
int32 ParticleIndex, |
||
| void | |||
| void | Reset () |
||
| void | ScaleClusterGeometry_Internal
(
const FVector& WorldScale |
Scale the cluster particles geometry (creates if necessary an additional TImplicitObjectScaled object into the implicits hierarchy) | |
| void | SetAnchoredByIndex_External
(
int32 Index, |
||
| void | SetAnchoredByTransformedBox_External
(
const FBox& Box, |
||
| void | SetClusteredParticleKinematicTarget_Internal
(
Chaos::FPBDRigidClusteredParticleHandle* Handle, |
||
| void | SetCollisionParticlesPerObjectFraction
(
float CollisionParticlesPerObjectFractionIn |
||
| void | SetCreateTraceCollisionGeometryCallback
(
FCreateTraceCollisionGeometryCallback InCreateGeometryCallback |
||
| void | SetDamageModel_External
(
EDamageModelTypeEnum DamageModel |
||
| void | SetDamageModel_Internal
(
EDamageModelTypeEnum DamageModel |
||
| void | SetDamagePropagationData_External
(
bool bEnabled, |
||
| void | SetDamagePropagationData_Internal
(
bool bEnabled, |
||
| void | SetDamageThresholds_External
(
const TArray< float >& DamageThresholds |
||
| void | SetDamageThresholds_Internal
(
const TArray< float >& DamageThresholds |
||
| void | SetEnableDamageFromCollision_External
(
bool bEnable |
||
| void | SetFilterData_Internal
(
const FCollisionFilterData& NewSimFilter, |
||
| void | SetGravityGroupIndex_External
(
int32 GravityGroupIndex |
||
| void | SetGravityGroupIndex_Internal
(
int32 GravityGroupIndex |
||
| void | SetMaterialOverrideMassScaleMultiplier_External
(
float InMultiplier |
||
| void | SetMaterialOverrideMassScaleMultiplier_Internal
(
float InMultiplier |
||
| void | SetNotifyBreakings_External
(
bool bNotify |
||
| void | SetNotifyCrumblings_External
(
bool bNotify, |
||
| void | SetNotifyGlobalBreakings_External
(
bool bNotify |
||
| void | SetNotifyGlobalCrumblings_External
(
bool bNotify, |
||
| void | SetNotifyGlobalRemovals_External
(
bool bNotify |
||
| void | SetNotifyRemovals_External
(
bool bNotify |
||
| void | SetOneWayInteractionLevel_External
(
int32 OneWayInteractionLevel |
||
| void | SetOneWayInteractionLevel_Internal
(
int32 InOneWayInteractionLevel |
||
| void | SetPerParticleFilterData_Internal
(
const TArray< FParticleCollisionFilterData >& PerParticleData |
||
| void | SetPhysicsMaterial_External
(
const Chaos::FMaterialHandle& MaterialHandle |
||
| void | SetPhysicsMaterial_Internal
(
const Chaos::FMaterialHandle& MaterialHandle |
||
| void | SetPostParticlesCreatedCallback
(
TFunction< void()> Callback |
||
| void | SetPostPhysicsSyncCallback
(
TFunction< void()> Callback |
||
| void | |||
| void | SetReplicationMode
(
EReplicationMode Mode |
||
| void | SetSleepingState
(
const Chaos::FPBDRigidsSolver& RigidsSolver |
||
| void | SetUseMaterialDamageModifiers_External
(
bool bUseMaterialDamageModifiers |
||
| void | SetUseMaterialDamageModifiers_Internal
(
bool bUseMaterialDamageModifiers |
||
| void | SetUseStaticMeshCollisionForTraces_External
(
bool bInUseStaticMeshCollisionForTraces |
Todo(chaos): Remove this and move to a cook time approach of the SM data based on the GC property Set whether the GC should be using collision from the Static Mesh or the GC itself for game thread traces ( this needs to be called on the game thread ) | |
| void | SetWorldTransform_External
(
const FTransform& WorldTransform |
Set the world transform ( this needs to be called on the game thread ) | |
| void | SetWorldTransform_Internal
(
const FTransform& WorldTransform |
||
| void | StartFrameCallback
(
const float InDt, |
||
| void | |||
| void | |||
| void | UpdateFilterData_External
(
const FCollisionFilterData& NewSimFilter, |
||
| void | UpdateKinematicBodiesCallback
(
const FParticlesType& InParticles, |
||
| void | UpdatePerParticleFilterData_External
(
const TArray< FParticleCollisionFilterData >& Data |
Overridden from IPhysicsProxyBase
| Type | Name | Description | |
|---|---|---|---|
| void * | Implemented so we can construct TAccelerationStructureHandle. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FParticleCollisionFilterData |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EReplicationMode |
Typedefs
| Name | Description |
|---|---|
| Base | |
| FClusterHandle | |
| FCreateTraceCollisionGeometryCallback | Todo(chaos): Remove this and move to a cook time approach of the SM data based on the GC property |
| FParticle | |
| FParticleHandle | |
| FSimplicial |