FGeometryCollectionPhysicsProxy

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](API\Runtime\ChaosSolvers\FGeometryDynamicCollection)_.

Windows
MacOS
Linux

Inheritance Hierarchy

IPhysicsProxyBase

TPhysicsProxy

FGeometryCollectionPhysicsProxy

References

Module

ChaosSolvers

Header

/Engine/Source/Runtime/Experimental/ChaosSolvers/Public/PhysicsProxy/GeometryCollectionPhysicsProxy.h

Include

#include "PhysicsProxy/GeometryCollectionPhysicsProxy.h"

Syntax

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

Name Description

Public function

FGeometryCollectionPhysicsProxy()

Public function

FGeometryCollectionPhysicsProxy

(
    UObject * InOwner,
    FGeometryDynamicCollection & GameTh...,
    const FSimulationParameters & Simul...,
    FCollisionFilterData InSimFilter,
    FCollisionFilterData InQueryFilter,
    FInitFunc InInitFunc,
    FCacheSyncFunc InCacheSyncFunc,
    FFinalSyncFunc InFinalSyncFunc,
    const Chaos::EMultiBufferMode Buffe...
)

`InOwner_`InDynamicCollection_ game thread owned geometry collection.

Destructors

Functions

Name Description

Public function

void

 

AddForceCallback

(
    FParticlesType & InParticles,
    const float InDt,
    const int32 InIndex
)

Public function

void

 

BindParticleCallbackMapping

Public function

void

 

BufferCommand

(
    Chaos::FPhysicsSolver *,
    const FFieldSystemCommand & Command
)

Enqueue a field Command_ to be processed by ProcessCommands() or `FieldForcesUpdateCallback() .

Public function

void

 

BufferGameState()

Public function

void

 

BufferPhysicsResults()

Push physics state into the `PhysToGameInterchange_.

Protected function

Chaos::TPBDR ...

 

BuildClusters

(
    const uint32 CollectionClusterIndex,
    TArray < Chaos::TPBDRigidParticleHan ...,
    const TArray < int32 >& ChildTransf...,
    const Chaos::FClusterCreationParame ...
)

Build a physics thread cluster parent particle.

Protected function Const

int32

 

CalculateHierarchyLevel

(
    const FGeometryDynamicCollection & ...,
    int32 TransformIndex
)

Traverses the parents of TransformIndex_ in GeometryCollection, counting the number of levels until the next parent is `INDEX_NONE.

Public function

void

 

ClearAccumulatedData()

Called at the end of `FPBDRigidsSolver::PushPhysicsStateExec()_.

Public function

EPhysicsProx ...

 

ConcreteType()

Public function

void

 

CreateRigidBodyCallback

(
    FParticlesType & InOutParticles
)

Public function

void

 

DisableCollisionsCallback

(
    TSet < TTuple < int32 , int32 >>& InP...
)

Public function

void

 

EndFrameCallback

(
    const float InDt
)

Public function

void

 

FieldForcesUpdateCallback

(
    Chaos::FPhysicsSolver * InSolve...,
    FParticlesType & Particles,
    Chaos::TArrayCollectionArray < FVect ...,
    Chaos::TArrayCollectionArray < FVect ...,
    const float Time
)

Public function

void

 

FlipBuffer()

Does nothing as `BufferPhysicsResults() _ already did this.

Public function Const

const FGeome ...

 

GetConsumerResultsGT()

Protected function

void

 

GetRelevantHandles

(
    TArray < Chaos::TGeometryParticleHan ...,
    TArray < FVector >& Samples,
    TArray < ContextIndex >& SampleIndi...,
    const Chaos::FPhysicsSolver * R...,
    EFieldResolutionType ResolutionType,
    bool bForce
)

Public function

TArray < FClu ...

 

GetSolverClusterHandles()

Public function

TArray < FClu ...

 

GetSolverParticleHandles()

Public function

void

 

Initialize()

Construct `PTDynamicCollection_, copying attributes from the game thread, and prepare for simulation.

Public function

void

 

InitializeBodiesPT

Finish initialization on the physics thread.

Public function Static

void

 

InitializeDynamicCollection

(
    FGeometryDynamicCollection & Dynami...,
    const FGeometryCollection & RestCol...,
    const FSimulationParameters & Param...
)

Protected function

void

 

InitializeRemoveOnFracture

(
    FParticlesType & Particles,
    const TManagedArray < int32 >& Dyna...
)

Public function Static

void

 

InitializeSharedCollisionStructures

(
    Chaos::FErrorReporter & ErrorReport...,
    FGeometryCollection & RestCollectio...,
    const FSharedSimulationParameters &...
)

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

Public function Static

void

 

InitRemoveOnFracture

(
    FGeometryCollection & RestCollectio...,
    const FSharedSimulationParameters &...
)

Public function

bool

 

IsDirty()

Public function Const

bool

 

IsGTCollectionDirty()

Public function Const

bool

 

IsSimulating()

Public function

Chaos::FPart ...

 

NewData()

Pushes current game thread particle state into the `GameToPhysInterchange_.

Public function

void

 

OnRemoveFromScene()

Public function

void

 

OnRemoveFromSolver

(
    Chaos::FPBDRigidsSolver * RBDSo...
)

Public function

void

 

ParameterUpdateCallback

(
    FParticlesType & InParticles,
    const float InTime
)

Protected function

void

 

ProcessCommands

(
    FParticlesType & Particles,
    const float Time
)

Public function

void

 

PullFromPhysicsState()

Pulls data out of the PhysToGameInterchange and updates `GTDynamicCollection_.

Protected function

void

 

PushKinematicStateToSolver

(
    FParticlesType & Particles
)

Public function

void

 

PushToPhysicsState

(
    const Chaos::FParticleData *
)

Push game data to the physics thread.

Public function

void

 

Reset()

Public function

void

 

SetCollisionParticlesPerObjectFraction

(
    float CollisionParticlesPerObjectFr...
)

Public function

void

 

StartFrameCallback

(
    const float InDt,
    const float InTime
)

Public function

void

 

SyncBeforeDestroy()

Public function

void

 

UpdateKinematicBodiesCallback

(
    const FParticlesType & InParticles,
    const float InDt,
    const float InTime,
    FKinematicProxy& InKinematicProxy
)

Typedefs

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback