UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FChaosSolversModule Class Reference

#include <ChaosSolversModule.h>

Public Member Functions

CHAOS_API FChaosSolversModule ()
 
CHAOS_API void StartupModule ()
 
CHAOS_API void ShutdownModule ()
 
CHAOS_API void Initialize ()
 
CHAOS_API void Shutdown ()
 
CHAOS_API bool IsPersistentTaskEnabled () const
 
CHAOS_API bool IsPersistentTaskRunning () const
 
CHAOS_API Chaos::FPersistentPhysicsTask * GetDedicatedTask () const
 
CHAOS_API void SyncTask (bool bForceBlockingSync=false)
 
CHAOS_API Chaos::FPBDRigidsSolverCreateSolver (UObject *InOwner, Chaos::FReal InAsyncDt, Chaos::EThreadingMode ThreadingMode=Chaos::EThreadingMode::SingleThread, const FName &DebugName=NAME_None)
 
CHAOS_API void MigrateSolver (Chaos::FPhysicsSolverBase *InSolver, const UObject *InNewOwner)
 
void SetSolverActorClass (UClass *InActorClass, UClass *InActorRequiredBaseClass)
 
CHAOS_API UClassGetSolverActorClass () const
 
CHAOS_API bool IsValidSolverActorClass (UClass *Class) const
 
CHAOS_API void DestroySolver (Chaos::FPhysicsSolverBase *InState)
 
CHAOS_API const TArray< Chaos::FPhysicsSolverBase * > & GetAllSolvers () const
 
CHAOS_API TArray< const Chaos::FPhysicsSolverBase * > GetSolvers (const UObject *InOwner) const
 
CHAOS_API void GetSolvers (const UObject *InOwner, TArray< const Chaos::FPhysicsSolverBase * > &OutSolvers) const
 
CHAOS_API TArray< Chaos::FPhysicsSolverBase * > GetSolversMutable (const UObject *InOwner)
 
CHAOS_API void GetSolversMutable (const UObject *InOwner, TArray< Chaos::FPhysicsSolverBase * > &OutSolvers)
 
CHAOS_API void DumpHierarchyStats (int32 *OutOptMaxCellElements=nullptr)
 
void RegisterSolverActorClassProvider (IChaosSolverActorClassProvider *Provider)
 
CHAOS_API const IChaosSettingsProviderGetSettingsProvider () const
 
void SetSettingsProvider (IChaosSettingsProvider *InProvider)
 
void LockSolvers ()
 
void UnlockSolvers ()
 
CHAOS_API void OnUpdateMaterial (Chaos::FMaterialHandle InHandle)
 
CHAOS_API void OnCreateMaterial (Chaos::FMaterialHandle InHandle)
 
CHAOS_API void OnDestroyMaterial (Chaos::FMaterialHandle InHandle)
 
CHAOS_API void OnUpdateMaterialMask (Chaos::FMaterialMaskHandle InHandle)
 
CHAOS_API void OnCreateMaterialMask (Chaos::FMaterialMaskHandle InHandle)
 
CHAOS_API void OnDestroyMaterialMask (Chaos::FMaterialMaskHandle InHandle)
 
CHAOS_API void GetSolverUpdatePrerequisites (FGraphEventArray &InPrerequisiteContainer)
 

Static Public Member Functions

static CHAOS_API FChaosSolversModuleGetModule ()
 

Constructor & Destructor Documentation

◆ FChaosSolversModule()

FChaosSolversModule::FChaosSolversModule ( )

Member Function Documentation

◆ CreateSolver()

Chaos::FPBDRigidsSolver * FChaosSolversModule::CreateSolver ( UObject InOwner,
Chaos::FReal  InAsyncDt,
Chaos::EThreadingMode  ThreadingMode = Chaos::EThreadingMode::SingleThread,
const FName DebugName = NAME_None 
)

Create a new solver state storage object to contain a solver and proxy storage object. Intended to be used by the physics scene to create a common storage object that can be passed to a dedicated thread when it is enabled without having to link Engine from Chaos.

Should be called from the game thread to create a new solver. After creation, non-standalone solvers are dispatched to the physics thread automatically if it is available

Parameters
InOwnerPtr to some owning UObject. The module doesn't use this but allows calling code to organize solver ownership
ThreadingModeThe desired threading mode the solver will use
bStandaloneWhether the solver is standalone (not sent to physics thread - updating left to caller)

◆ DestroySolver()

void FChaosSolversModule::DestroySolver ( Chaos::FPhysicsSolverBase InState)

Shuts down and destroys a solver state

Should be called on whichever thread currently owns the solver state

◆ DumpHierarchyStats()

void FChaosSolversModule::DumpHierarchyStats ( int32 OutOptMaxCellElements = nullptr)

Outputs statistics for the solver hierarchies. Currently engine calls into this from a console command on demand.

◆ GetAllSolvers()

const TArray< Chaos::FPhysicsSolverBase * > & FChaosSolversModule::GetAllSolvers ( ) const

Retrieve the list of all extant solvers. This contains all owned, unowned and standalone solvers

◆ GetDedicatedTask()

Chaos::FPersistentPhysicsTask * FChaosSolversModule::GetDedicatedTask ( ) const

Gets the inner physics thread task if it has been spawned. Care must be taken when using methods and members that the calling context can safely access those fields as the task will be running on its own thread.

◆ GetModule()

FChaosSolversModule * FChaosSolversModule::GetModule ( )
static

◆ GetSettingsProvider()

const IChaosSettingsProvider & FChaosSolversModule::GetSettingsProvider ( ) const

Safe method for always getting a settings provider (from the external caller or an internal default)

◆ GetSolverActorClass()

UClass * FChaosSolversModule::GetSolverActorClass ( ) const

◆ GetSolvers() [1/2]

TArray< const Chaos::FPhysicsSolverBase * > FChaosSolversModule::GetSolvers ( const UObject InOwner) const

Read access to the current solver-state objects, be aware which thread owns this data when attempting to use this. Physics thread will query when spinning up to get current world state

◆ GetSolvers() [2/2]

void FChaosSolversModule::GetSolvers ( const UObject InOwner,
TArray< const Chaos::FPhysicsSolverBase * > &  OutSolvers 
) const

◆ GetSolversMutable() [1/2]

TArray< Chaos::FPhysicsSolverBase * > FChaosSolversModule::GetSolversMutable ( const UObject InOwner)

Non-const access to the solver array is private - only the module should ever modify the storage lists

◆ GetSolversMutable() [2/2]

void FChaosSolversModule::GetSolversMutable ( const UObject InOwner,
TArray< Chaos::FPhysicsSolverBase * > &  OutSolvers 
)

◆ GetSolverUpdatePrerequisites()

CHAOS_API void FChaosSolversModule::GetSolverUpdatePrerequisites ( FGraphEventArray InPrerequisiteContainer)

Gets a list of pending prerequisites required before proceeding with a solver update

◆ Initialize()

void FChaosSolversModule::Initialize ( )

◆ IsPersistentTaskEnabled()

bool FChaosSolversModule::IsPersistentTaskEnabled ( ) const

Queries for multithreaded configurations

◆ IsPersistentTaskRunning()

bool FChaosSolversModule::IsPersistentTaskRunning ( ) const

◆ IsValidSolverActorClass()

bool FChaosSolversModule::IsValidSolverActorClass ( UClass Class) const

◆ LockSolvers()

void FChaosSolversModule::LockSolvers ( )
inline

◆ MigrateSolver()

void FChaosSolversModule::MigrateSolver ( Chaos::FPhysicsSolverBase InSolver,
const UObject InNewOwner 
)

◆ OnCreateMaterial()

void FChaosSolversModule::OnCreateMaterial ( Chaos::FMaterialHandle  InHandle)

◆ OnCreateMaterialMask()

void FChaosSolversModule::OnCreateMaterialMask ( Chaos::FMaterialMaskHandle  InHandle)

◆ OnDestroyMaterial()

void FChaosSolversModule::OnDestroyMaterial ( Chaos::FMaterialHandle  InHandle)

◆ OnDestroyMaterialMask()

void FChaosSolversModule::OnDestroyMaterialMask ( Chaos::FMaterialMaskHandle  InHandle)

◆ OnUpdateMaterial()

void FChaosSolversModule::OnUpdateMaterial ( Chaos::FMaterialHandle  InHandle)

Events that the material manager will emit for us to update our threaded data

◆ OnUpdateMaterialMask()

void FChaosSolversModule::OnUpdateMaterialMask ( Chaos::FMaterialMaskHandle  InHandle)

◆ RegisterSolverActorClassProvider()

void FChaosSolversModule::RegisterSolverActorClassProvider ( IChaosSolverActorClassProvider Provider)
inline

◆ SetSettingsProvider()

void FChaosSolversModule::SetSettingsProvider ( IChaosSettingsProvider InProvider)
inline

◆ SetSolverActorClass()

void FChaosSolversModule::SetSolverActorClass ( UClass InActorClass,
UClass InActorRequiredBaseClass 
)
inline

Sets the actor type which should be AChaosSolverActor::StaticClass() but that is not accessible from engine.

◆ Shutdown()

void FChaosSolversModule::Shutdown ( )

◆ ShutdownModule()

void FChaosSolversModule::ShutdownModule ( )

◆ StartupModule()

void FChaosSolversModule::StartupModule ( )

◆ SyncTask()

void FChaosSolversModule::SyncTask ( bool  bForceBlockingSync = false)

Called to request a sync between the game thread and the currently running physics task

Parameters
bForceBlockingSyncforces this

◆ UnlockSolvers()

void FChaosSolversModule::UnlockSolvers ( )
inline

The documentation for this class was generated from the following files: