FPhysicsSolverBase

Windows
MacOS
Linux

Inheritance Hierarchy

FPhysicsSolverBase

FPBDRigidsSolver

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/PhysicsSolverBase.h

Include

#include "Chaos/Framework/PhysicsSolverBase.h"

Syntax

class FPhysicsSolverBase

Variables

Name Description

Protected variable

EMultiBufferMod...

 

BufferMode

Mode that the results buffers should be set to (single, double, triple)

Protected variable

bool

 

bUseCollisionResimCache

Protected variable

TArray< ISimCal...

 

ContactModifiers

Protected variable

FSolverPostAdva...

 

EventPostSolve

Protected variable

FSolverPreBuffe...

 

EventPreBuffer

Protected variable

FSolverPreAdvan...

 

EventPreSolve

Storage for events, see the Add/Remove pairs above for event timings

Protected variable

FChaosMarshalli...

 

MarshallingManager

Protected variable

TUniquePtr< IRe...

 

MRewindCallback

Protected variable

TUniquePtr< FRe...

 

MRewindData

Protected variable

TUniquePtr< FPe...

 

PendingSpatialOperations_External

The spatial operations not yet consumed by the internal sim. Use this to ensure any GT operations are seen immediately.

Protected variable

FGraphEventRef

 

PendingTasks

Protected variable

TUniquePtr< FCh...

 

PullResultsManager

Protected variable

TArray< ISimCal...

 

SimCallbackObjects

Protected variable

EThreadingModeT...

 

ThreadingMode

Constructors

Name Description

Protected function

FPhysicsSolverBase()

Protected function

FPhysicsSolverBase

(
    const FPhysicsSolverBase& InCopy
)

Protected function

FPhysicsSolverBase

(
    FPhysicsSolverBase&& InSteal
)

Protected function

FPhysicsSolverBase

(
    const EMultiBufferMode BufferingMod...,
    const EThreadingModeTemp InThreadin...,
    UObject* InOwner
)

Protected construction so callers still have to go through the module to create new instances

Destructors

Name Description

Protected function Virtual

~FPhysicsSolverBase()

Only allow construction with valid parameters as well as restricting to module construction

Functions

Name Description

Public function

void

 

AddDirtyProxiesUnsafe

(
    TProxiesArray& ProxiesArray
)

Batch dirty proxies without checking DirtyIdx.

Public function

void

 

AddDirtyProxy

(
    IPhysicsProxyBase* ProxyBaseIn
)

Public function

void

 

AddDirtyProxyShape

(
    IPhysicsProxyBase* ProxyBaseIn,
    int32 ShapeIdx
)

Public function

FDelegateHan...

 

AddPostAdvanceCallback

(
    FSolverPostAdvance::FDelegate InDel...
)

Post advance happens after all processing and results generation has been completed

Public function

FDelegateHan...

 

AddPreAdvanceCallback

(
    FSolverPreAdvance::FDelegate InDele...
)

Events Pre advance is called before any physics processing or simulation happens in a given physics update

Public function

FDelegateHan...

 

AddPreBufferCallback

(
    FSolverPreAdvance::FDelegate InDele...
)

Pre buffer happens after the simulation has been advanced (particle positions etc. will have been updated) but GT results haven't been prepared yet

Public function

FGraphEventR...

 

AdvanceAndDispatch_External

(
    FReal InDt
)

Protected function

void

 

AdvanceSolverBy

(
    const FReal Dt,
    const FSubStepInfo& SubStepInfo
)

Public function

void

 

ApplyCallbacks_Internal

(
    const FReal SimTime,
    const FReal Dt
)

Public function Virtual Const

bool

 

AreAnyTasksPending()

Public function

FPBDRigidsSo...

 

CastChecked()

Public function

void

 

CastHelper

(
    const Lambda& Func
)

Public function

void

 

ChangeBufferMode

(
    EMultiBufferMode InBufferMode
)

Protected function

void

 

ClearGTParticle_External

(
    FGeometryParticle& Particle
)

Public function Virtual

void

 

ConditionalApplyRewind_Internal()

Public function

TSimCallback...

 

CreateAndRegisterSimCallbackObject_External

(
    bool bContactModification
)

Creates a new sim callback object of the type given.

Protected function Static

void

 

DestroySolver

(
    FPhysicsSolverBase& InSolver
)

Public function

void

 

DisableAsyncMode()

Public function

void

 

EnableAsyncMode

(
    FReal FixedDt
)

Public function

void

 

EnableRewindCapture

(
    int32 NumFrames,
    bool InUseCollisionResimCache,
    TUniquePtr< IRewindCallback >&& Re...
)

Public function

void

 

EnqueueCommandImmediate

(
    Lambda&& Func
)

Public function

void

 

FinalizeCallbackData_Internal()

Public function Const

FPhysicsScen...

 

GetExternalDataLock_External()

Get the lock used for external data manipulation.

Public function

FChaosMarsha...

 

GetMarshallingManager()

Public function Const

const UObjec...

 

GetOwner()

Public function Const

FReal

 

GetPhysicsResultsTime_External()

Returns the time used by physics results. If fixed dt is used this will be the interpolated time

Public function

IRewindCallb...

 

GetRewindCallback()

Public function

FRewindData ...

 

GetRewindData()

Public function Const

EThreadingMo...

 

GetThreadingMode()

Public function Const

bool

 

IsPaused_External()

Public function Const

bool

 

IsPendingTasksComplete()

Public function Const

bool

 

IsShuttingDown()

Public function Const

bool

 

IsUsingAsyncResults()

Public function Const

bool

 

IsUsingFixedDt()

Public function

void

 

MarkShuttingDown()

Public function

void

 

PopAndExecuteStolenAdvanceTask_ForTesting()

Protected function

void

 

ProcessPushedData_Internal

(
    FPushPhysicsData& PushDataArray
)

Public function

void

 

PullPhysicsStateForEachDirtyProxy_External

(
    const RigidLambda& RigidFunc
)

Pulls physics state for each dirty particle and allows caller to do additional work if needed.

Protected function

void

 

PushPhysicsState

(
    const FReal Dt,
    const int32 NumSteps,
    const int32 NumExternalSteps
)

Public function

void

 

RegisterSimOneShotCallback

(
    Lambda&& Func
)

Public function

void

 

RemoveDirtyProxy

(
    IPhysicsProxyBase* ProxyBaseIn
)

Public function

bool

 

RemovePostAdvanceCallback

(
    FDelegateHandle InHandle
)

Public function

bool

 

RemovePreAdvanceCallback

(
    FDelegateHandle InHandle
)

Public function

bool

 

RemovePreBufferCallback

(
    FDelegateHandle InHandle
)

Protected function

void

 

SetExternalTimestampConsumed_Internal

(
    const int32 Timestamp
)

Public function

void

 

SetIsPaused_External

(
    bool bShouldPause
)

Public function

void

 

SetNumDirtyShapes

(
    IPhysicsProxyBase* Proxy,
    int32 NumShapes
)

Public function

void

 

SetOwner

(
    const UObject* InOwner
)

Public function

void

 

SetRewindCallback

(
    TUniquePtr< IRewindCallback >&& Re...
)

Public function

void

 

SetStealAdvanceTasks_ForTesting

(
    bool bInStealAdvanceTasksForTesting
)

Public function

void

 

SetThreadingMode_External

(
    EThreadingModeTemp InThreadingMode
)

Protected function

void

 

TrackGTParticle_External

(
    FGeometryParticle& Particle
)

Public function Const

FGeometryPar...

 

UniqueIdxToGTParticle_External

(
    const FUniqueIdx& UniqueIdx
)

Used as helper for GT to go from unique idx back to gt particle If GT deletes a particle, this function will return null (that's a good thing when consuming async outputs as GT may have already deleted the particle we care about) In this case instead of getting a nullptr you will get an unrelated (wrong) GT particle Because of this we keep the index alive for as long as the async callback can lag behind.

Public function

void

 

UnregisterAndFreeSimCallbackObject_External

(
    ISimCallbackObject* SimCallbac...
)

Public function

void

 

UpdateParticleInAccelerationStructure_External

(
    FGeometryParticle* Particle,
    bool bDelete
)

Public function

void

 

WaitOnPendingTasks_External()

Ensures that any running tasks finish.

Operators

Name Description

Protected function

FPhysicsSolv...

 

operator=

(
    FPhysicsSolverBase&& InSteal
)

Protected function

FPhysicsSolv...

 

operator=

(
    const FPhysicsSolverBase& InCopy
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss