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 | CalculateEffectiveParticles
(
const FGeometryDynamicCollection& DynamicCollection, |
||
| 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 | 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 & | |||
| TManagedArray< TUniquePtr< FParticle > > & | |||
| void | GetFilteredParticleHandles
(
TArray< Chaos::TGeometryParticleHandle< Chaos::FReal, 3 >* >& Handles, |
Get all the geometry collection particle handles filtered by object state | |
| FGeometryCollectionItemIndex | GetInternalClusterParentItemIndex_External
(
int32 ChildTransformIndex |
||
| const FProxyInterpolationBase & | |||
| FProxyInterpolationBase & | |||
| bool | |||
| FGeometryCollectionItemIndex | GetItemIndexFromGTParticle_External
(
const FParticle* GTPParticle |
||
| FGeometryCollectionItemIndex | GetItemIndexFromGTParticleNoInternalCluster_External
(
const FParticle* GTPParticle |
||
| int32 | |||
| 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 |
||
| void | GetRelevantParticleHandles
(
TArray< Chaos::TGeometryParticleHandle< Chaos::FReal, 3 >* >& Handles, |
* Get all the geometry collection particle handles based on the processing resolution | |
| EReplicationMode | |||
| FSimulationParameters & | |||
| const FSimulationParameters & | |||
| TArray< FClusterHandle * > & | |||
| TArray< FClusterHandle * > & | |||
| int32 | GetTransformGroupIndexFromHandle
(
const FParticleHandle* Handle |
||
| void | GetTransformGroupIndicesFromHandles
(
const TArray< FParticleHandle* > Handles, |
||
| FName | GetTransformName_External
(
FGeometryCollectionItemIndex ItemIndex |
||
| 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 | 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 | |||
| void | Reset () |
||
| void | SetAnchoredByIndex_External
(
int32 Index, |
||
| void | SetAnchoredByTransformedBox_External
(
const FBox& Box, |
||
| void | SetClusteredParticleKinematicTarget_Internal
(
Chaos::FPBDRigidClusteredParticleHandle* Handle, |
||
| void | SetCollisionParticlesPerObjectFraction
(
float CollisionParticlesPerObjectFractionIn |
||
| void | SetEnableDamageFromCollision_External
(
bool bEnable |
||
| 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 | SetPostPhysicsSyncCallback
(
TFunction< void()> Callback |
||
| void | |||
| void | SetReplicationMode
(
EReplicationMode Mode |
||
| void | SetSleepingState
(
const Chaos::FPBDRigidsSolver& RigidsSolver |
||
| void | SetWorldTransform_External
(
const FTransform& WorldTransform |
Set the world transform ( this needs to be called on the game thread ) | |
| void | StartFrameCallback
(
const float InDt, |
||
| 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 | |
| FParticle | |
| FParticleHandle | |
| FSimplicial |