Navigation
API > API/Runtime > API/Runtime/Chaos
| Name | FPhysicsSolverBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/PhysicsSolverBase.h |
| Include Path | #include "Chaos/Framework/PhysicsSolverBase.h" |
Syntax
class FPhysicsSolverBase : public Chaos::FPhysicsSolverEvents
Inheritance Hierarchy
- FPhysicsSolverEvents → FPhysicsSolverBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPhysicsSolverBase
(
const EMultiBufferMode BufferingModeIn, |
Protected construction so callers still have to go through the module to create new instances | Chaos/Framework/PhysicsSolverBase.h | |
FPhysicsSolverBase
(
FPhysicsSolverBase&& InSteal |
Chaos/Framework/PhysicsSolverBase.h | ||
FPhysicsSolverBase
(
const FPhysicsSolverBase& InCopy |
Chaos/Framework/PhysicsSolverBase.h | ||
| Chaos/Framework/PhysicsSolverBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPhysicsSolverBase() |
Only allow construction with valid parameters as well as restricting to module construction | Chaos/Framework/PhysicsSolverBase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AccumulatedTime | FReal | Chaos/Framework/PhysicsSolverBase.h | ||
| AsyncBlockMode | EAsyncBlockMode | Chaos/Framework/PhysicsSolverBase.h | ||
| AsyncDt | FReal | Chaos/Framework/PhysicsSolverBase.h | ||
| AsyncMultiplier | float | Chaos/Framework/PhysicsSolverBase.h | ||
| bIsShuttingDown | bool | Chaos/Framework/PhysicsSolverBase.h | ||
| bPaused_External | bool | Whether this solver is paused. | Chaos/Framework/PhysicsSolverBase.h | |
| bSolverSubstep_External | bool | Chaos/Framework/PhysicsSolverBase.h | ||
| bStealAdvanceTasksForTesting | bool | Solver testing utility. | Chaos/Framework/PhysicsSolverBase.h | |
| ExternalDataLock_External | TUniquePtr< FPhysSceneLock > | Scene lock object for external threads (non-physics) | Chaos/Framework/PhysicsSolverBase.h | |
| ExternalSteps | int32 | Chaos/Framework/PhysicsSolverBase.h | ||
| FChaosSolversModule | friend | Chaos/Framework/PhysicsSolverBase.h | ||
| FPhysicsSolverAdvanceTask | friend | Chaos/Framework/PhysicsSolverBase.h | ||
| FPhysicsSolverProcessPushDataTask | friend | Chaos/Framework/PhysicsSolverBase.h | ||
| MMaxDeltaTime | float | Chaos/Framework/PhysicsSolverBase.h | ||
| MMaxSubSteps | int32 | Chaos/Framework/PhysicsSolverBase.h | ||
| MMinDeltaTime | float | Chaos/Framework/PhysicsSolverBase.h | ||
| NumPendingSolverAdvanceTasks | TAtomic< int32 > | Number of ending solver task that has not been executed or that are still being executed. | Chaos/Framework/PhysicsSolverBase.h | |
| Owner | const UObject * | Ptr to the engine object that is counted as the owner of this solver. | Chaos/Framework/PhysicsSolverBase.h | |
| SimMaterialLock | FRWLock | TODO: why is this needed? seems bad to read from solver directly, should be buffered. | Chaos/Framework/PhysicsSolverBase.h | |
| StolenSolverAdvanceTasks | TArray< FAllSolverTasks > | Chaos/Framework/PhysicsSolverBase.h | ||
| UniqueIdxToGTParticles | TArray< FGeometryParticle * > | Chaos/Framework/PhysicsSolverBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddDirtyProxiesUnsafe
(
TProxiesArray& ProxiesArray |
Batch dirty proxies without checking DirtyIdx. | Chaos/Framework/PhysicsSolverBase.h | |
void AddDirtyProxy
(
IPhysicsProxyBase* ProxyBaseIn |
Chaos/Framework/PhysicsSolverBase.h | ||
void AddDirtyProxyShape
(
IPhysicsProxyBase* ProxyBaseIn, |
Chaos/Framework/PhysicsSolverBase.h | ||
FGraphEventRef AdvanceAndDispatch_External
(
FReal InDt |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual void ApplyCallbacks_Internal() |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual bool AreAnyTasksPending() |
Chaos/Framework/PhysicsSolverBase.h | ||
FPBDRigidsSolver & CastChecked() |
Chaos/Framework/PhysicsSolverBase.h | ||
void CastHelper
(
const Lambda& Func |
Chaos/Framework/PhysicsSolverBase.h | ||
void ChangeBufferMode
(
EMultiBufferMode InBufferMode |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual void ConditionalApplyRewind_Internal() |
Chaos/Framework/PhysicsSolverBase.h | ||
TSimCallbackObjectType * CreateAndRegisterSimCallbackObject_External
(
bool bContactModification, |
Chaos/Framework/PhysicsSolverBase.h | ||
TSimCallbackObjectType * CreateAndRegisterSimCallbackObject_External
(
ConstructorArgTypes&&... ConstructorArgs |
Creates a new sim callback object of the type given. | Chaos/Framework/PhysicsSolverBase.h | |
void DisableAsyncMode() |
Chaos/Framework/PhysicsSolverBase.h | ||
void EnableAsyncMode
(
FReal FixedDt |
Chaos/Framework/PhysicsSolverBase.h | ||
void EnqueueCommandImmediate
(
Lambda&& Func |
Chaos/Framework/PhysicsSolverBase.h | ||
void EnqueueCommandScheduled_External
(
const int32 ExecuteOnStep, |
Enqueue a lambda function (command) to run on the physics thread on a specific physics step The command will be reapplied during physics resimulation on the same step | Chaos/Framework/PhysicsSolverBase.h | |
void EnqueueSimcallbackRewindRegisteration
(
ISimCallbackObject* Callback |
Chaos/Framework/PhysicsSolverBase.h | ||
void FinalizeCallbackData_Internal() |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual void FlipEventManagerBuffer() |
Chaos/Framework/PhysicsSolverBase.h | ||
FReal GetAccumulatedTime() |
Chaos/Framework/PhysicsSolverBase.h | ||
FReal GetAsyncDeltaTime() |
Chaos/Framework/PhysicsSolverBase.h | ||
float GetAsyncInterpolationMultiplier() |
Chaos/Framework/PhysicsSolverBase.h | ||
FName GetDebugName() |
Chaos/Framework/PhysicsSolverBase.h | ||
const FDirtyProxiesBucketInfo & GetDirtyProxyBucketInfo_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
int32 GetDirtyProxyBucketInfoNum_External
(
EPhysicsProxyType Type |
Chaos/Framework/PhysicsSolverBase.h | ||
FPhysSceneLock & GetExternalDataLock_External() |
NOTE: this is a const operation so that you can acquire a read lock on a const solver. The assumption is that non-const write operations are already marked non-const. | Chaos/Framework/PhysicsSolverBase.h | |
FReal GetLastDt() |
Chaos/Framework/PhysicsSolverBase.h | ||
FChaosMarshallingManager & GetMarshallingManager() |
Chaos/Framework/PhysicsSolverBase.h | ||
float GetMaxDeltaTime_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
int32 GetMaxSubSteps_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
float GetMinDeltaTime_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
const UObject * GetOwner() |
Chaos/Framework/PhysicsSolverBase.h | ||
FPhysicsReplicationAsync * GetPhysicsReplication() |
Chaos/Framework/PhysicsSolverBase.h | ||
IPhysicsReplicationAsync * GetPhysicsReplication_Internal() |
Chaos/Framework/PhysicsSolverBase.h | ||
IPhysicsReplicationLODAsync * GetPhysicsReplicationLOD_Internal() |
Chaos/Framework/PhysicsSolverBase.h | ||
FReal GetPhysicsResultsTime_External() |
Returns the time used by physics results. If fixed dt is used this will be the interpolated time | Chaos/Framework/PhysicsSolverBase.h | |
FChaosResultsManager & GetResultsManager() |
Chaos/Framework/PhysicsSolverBase.h | ||
IRewindCallback * GetRewindCallback() |
Chaos/Framework/PhysicsSolverBase.h | ||
FRewindData * GetRewindData() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool GetSolverSubstep_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
const FReal GetSolverTime() |
Chaos/Framework/PhysicsSolverBase.h | ||
EThreadingModeTemp GetThreadingMode() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool GetUseCollisionResimCache () |
Check if an additional resim cache based on IResimCacheBase (FEvolutionResimCache by default) is being used. | Chaos/Framework/PhysicsSolverBase.h | |
bool IsGameThreadFrozen () |
Tells us if we're on the frozen game thread. | Chaos/Framework/PhysicsSolverBase.h | |
bool IsPaused_External() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool IsPendingTasksComplete() |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual bool IsResimming() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool IsShuttingDown() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool IsStandaloneSolver() |
Get the standalone solver flag | Chaos/Framework/PhysicsSolverBase.h | |
bool IsUsingAsyncResults() |
Chaos/Framework/PhysicsSolverBase.h | ||
bool IsUsingFixedDt() |
Chaos/Framework/PhysicsSolverBase.h | ||
virtual void KillSafeAsyncTasks() |
Chaos/Framework/PhysicsSolverBase.h | ||
void MarkShuttingDown() |
Chaos/Framework/PhysicsSolverBase.h | ||
void PopAndExecuteStolenAdvanceTask_ForTesting() |
Chaos/Framework/PhysicsSolverBase.h | ||
void PullPhysicsStateForEachDirtyProxy_External
(
TDispatcher& Dispatcher |
Used to update external thread data structures. | Chaos/Framework/PhysicsSolverBase.h | |
void PullPhysicsStateForEachDirtyProxy_External
(
const RigidLambda& RigidFunc, |
Chaos/Framework/PhysicsSolverBase.h | ||
void PullPhysicsStateForEachDirtyProxy_External
(
const RigidLambda& RigidFunc, |
Pulls physics state for each dirty particle and allows caller to do additional work if needed. | Chaos/Framework/PhysicsSolverBase.h | |
void RegisterSimOneShotCallback
(
Lambda&& Func |
Chaos/Framework/PhysicsSolverBase.h | ||
void RemoveDirtyProxy
(
IPhysicsProxyBase* ProxyBaseIn |
Chaos/Framework/PhysicsSolverBase.h | ||
void RemoveDirtyProxyFromHistory_Internal
(
IPhysicsProxyBase* ProxyBaseIn |
Chaos/Framework/PhysicsSolverBase.h | ||
void RemoveDirtyProxyIfNoShapesAreDirty
(
IPhysicsProxyBase* ProxyBaseIn |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetAsyncInterpolationMultiplier
(
FRealSingle InAsyncInterpolationMultiplier |
Set the async interpolation multiplier which is how many multiples of the fixed dt should we look behind for interpolation. | Chaos/Framework/PhysicsSolverBase.h | |
void SetAsyncPhysicsBlockMode
(
EAsyncBlockMode InAsyncBlockMode |
Set the Async Block Mode, valid mode can be 0, 1, or 2 0 blocks on any physics steps generated from past GT Frames, and blocks on none of the tasks from current frame. | Chaos/Framework/PhysicsSolverBase.h | |
void SetDebugDrawScene
(
const ChaosDD::Private::FChaosDDScenePtr& InCDDScene |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetGameThreadFrozen
(
bool InGameThreadFrozen |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetIsPaused_External
(
bool bShouldPause |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetMaxDeltaTime_External
(
float InMaxDeltaTime |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetMaxSubSteps_External
(
const int32 InMaxSubSteps |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetMinDeltaTime_External
(
float InMinDeltaTime |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetNumDirtyShapes
(
IPhysicsProxyBase* Proxy, |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetOwner
(
const UObject* InOwner |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetPhysicsReplication
(
FPhysicsReplicationAsync* InPhysicsReplication |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetPhysicsReplication_Internal
(
IPhysicsReplicationAsync* InPhysicsReplication |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetPhysicsReplicationLOD_Internal
(
IPhysicsReplicationLODAsync* InPhysicsReplicationLOD |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetRewindCallback
(
TUniquePtr< IRewindCallback >&& RewindCallback |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetSolverSubstep_External
(
bool bInSubstepExternal |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetSolverTime
(
const FReal InTime |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetStandaloneSolver
(
const bool bStandaloneSolver |
Set the standalone solver flag | Chaos/Framework/PhysicsSolverBase.h | |
void SetStealAdvanceTasks_ForTesting
(
bool bInStealAdvanceTasksForTesting |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetThreadingMode_External
(
EThreadingModeTemp InThreadingMode |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetUseCollisionResimCache
(
bool InUseCollisionResimCache |
Enable or disable an additional resim cache based on IResimCacheBase (FEvolutionResimCache by default) that also caches particle collision constraints this is disabled by default since cached collisions will be wrong during a resimulation for particles that are desynced and particles that are in sync doesn't need collision data since we just step through their states in history." | Chaos/Framework/PhysicsSolverBase.h | |
bool ShouldApplyRewindCallbacks() |
Chaos/Framework/PhysicsSolverBase.h | ||
FGeometryParticle * 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) Note: if the physics solver has been advanced after the particle was freed on GT, the index may have been freed and reused. | Chaos/Framework/PhysicsSolverBase.h | |
void UnregisterAndFreeSimCallbackObject_External
(
ISimCallbackObject* SimCallbackObject |
Chaos/Framework/PhysicsSolverBase.h | ||
void UpdateParticleInAccelerationStructure_External
(
FGeometryParticle* Particle, |
Chaos/Framework/PhysicsSolverBase.h | ||
void WaitOnPendingTasks_External() |
Ensures that any running tasks finish. | Chaos/Framework/PhysicsSolverBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdvanceSolverBy
(
const FSubStepInfo& SubStepInfo |
Chaos/Framework/PhysicsSolverBase.h | ||
void ClearGTParticle_External
(
FGeometryParticle& Particle |
Chaos/Framework/PhysicsSolverBase.h | ||
void PrepareAdvanceBy
(
const FReal Dt |
Chaos/Framework/PhysicsSolverBase.h | ||
void ProcessPushedData_Internal
(
FPushPhysicsData& PushDataArray |
Chaos/Framework/PhysicsSolverBase.h | ||
void PushPhysicsState
(
const FReal Dt, |
Chaos/Framework/PhysicsSolverBase.h | ||
void SetExternalTimestampConsumed_Internal
(
const int32 Timestamp |
Chaos/Framework/PhysicsSolverBase.h | ||
void TrackGTParticle_External
(
FGeometryParticle& Particle |
Chaos/Framework/PhysicsSolverBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CanDebugNetworkPhysicsPrediction() |
Check if we can enable debugging informations for network physics | Chaos/Framework/PhysicsSolverBase.h | |
static void DestroySolver
(
FPhysicsSolverBase& InSolver |
Chaos/Framework/PhysicsSolverBase.h | ||
static int32 GetPhysicsHistoryCount() |
Get the number of physics history frames to cache | Chaos/Framework/PhysicsSolverBase.h | |
static float GetPhysicsHistoryTimeLength() |
Get the time length to cache physics history for, based on Project Settings -> Physics -> Physics Prediction -> MaxSupportedLatencyPrediction | Chaos/Framework/PhysicsSolverBase.h | |
static float GetResimulationErrorAngularVelocityThreshold() |
Chaos/Framework/PhysicsSolverBase.h | ||
static bool GetResimulationErrorAngularVelocityThresholdEnabled() |
Chaos/Framework/PhysicsSolverBase.h | ||
static float GetResimulationErrorLinearVelocityThreshold() |
Chaos/Framework/PhysicsSolverBase.h | ||
static bool GetResimulationErrorLinearVelocityThresholdEnabled() |
Chaos/Framework/PhysicsSolverBase.h | ||
static float GetResimulationErrorPositionThreshold() |
Chaos/Framework/PhysicsSolverBase.h | ||
static bool GetResimulationErrorPositionThresholdEnabled() |
Chaos/Framework/PhysicsSolverBase.h | ||
static float GetResimulationErrorRotationThreshold() |
Chaos/Framework/PhysicsSolverBase.h | ||
static bool GetResimulationErrorRotationThresholdEnabled() |
Chaos/Framework/PhysicsSolverBase.h | ||
static bool IsNetworkPhysicsPredictionEnabled() |
Check if network physics is enables or not | Chaos/Framework/PhysicsSolverBase.h | |
static float NetworkPhysicsInterpolationLerp() |
Return the interpolation lerp in case the resim is off | Chaos/Framework/PhysicsSolverBase.h | |
static float ResimulationErrorThreshold() |
Chaos/Framework/PhysicsSolverBase.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPhysicsSolverBase & operator=
(
const FPhysicsSolverBase& InCopy |
Chaos/Framework/PhysicsSolverBase.h | ||
FPhysicsSolverBase & operator=
(
FPhysicsSolverBase&& InSteal |
Chaos/Framework/PhysicsSolverBase.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PhysicsReplication_DEPRECATED | FPhysicsReplicationAsync * | Chaos/Framework/PhysicsSolverBase.h |