UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::ISimulationModuleBase Class Referenceabstract

#include <SimulationModuleBase.h>

+ Inheritance diagram for Chaos::ISimulationModuleBase:

Public Member Functions

 DEFINE_CHAOSSIMTYPENAME (ISimulationModuleBase)
 
 ISimulationModuleBase ()
 
virtual ~ISimulationModuleBase ()
 
int GetGuid () const
 
void SetGuid (int GuidIn)
 
virtual const FString GetDebugName () const =0
 
virtual bool IsBehaviourType (eSimModuleTypeFlags InType) const =0
 
virtual bool IsEnabled () const
 
void SetStateFlags (eSimModuleState StateFlagsIn)
 
virtual void OnConstruction_External (const Chaos::FPhysicsObjectHandle &PhysicsObject)
 
virtual void OnTermination_External ()
 
virtual void Simulate (IPhysicsProxyBase *Proxy, Chaos::FPBDRigidParticleHandle *ParticleHandle, float DeltaTime, const FAllInputs &Inputs, FSimModuleTree &VehicleModuleSystem)
 
virtual void OnContactModification (Chaos::FCollisionContactModifier &Modifier, IPhysicsProxyBase *Proxy)
 
virtual void Simulate (float DeltaTime, const FAllInputs &Inputs, FSimModuleTree &VehicleModuleSystem)
 
virtual void Animate ()
 
void SetAnimationEnabled (bool bInEnabled)
 
bool IsAnimationEnabled ()
 
UE_API void SetAnimationData (const FName &BoneNameIn, const FVector &AnimationOffsetIn, int AnimationSetupIndexIn)
 
const FSimModuleAnimationDataGetAnimationData () const
 
const FVectorGetAnimationOffset () const
 
const FNameGetBoneName () const
 
int GetAnimationSetupIndex ()
 
virtual void DrawDebugInfo ()
 
virtual UE_API bool GetDebugString (FString &StringOut) const
 
void SetTransformIndex (int TransformIndexIn)
 
const int GetTransformIndex () const
 
void SetParticleIndex (FUniqueIdx ParticleIndexIn)
 
const FUniqueIdx GetParticleIndex () const
 
void SetTreeIndex (int TreeIndexIn)
 
int GetTreeIndex () const
 
void SetSimModuleTree (FSimModuleTree *SimModuleTreeIn)
 
UE_API void AddLocalForceAtPosition (const FVector &Force, const FVector &Position, bool bAllowSubstepping=true, bool bIsLocalForce=false, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddForceAtCOMPosition (const FVector &Force, const FVector &OffsetFromCOM=FVector::ZeroVector, bool bAllowSubstepping=true, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddLocalForce (const FVector &Force, bool bAllowSubstepping=true, bool bIsLocalForce=false, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddLocalTorque (const FVector &Torque, bool bAllowSubstepping=true, bool bAccelChangeIn=true, const FColor &DebugColorIn=FColor::Magenta)
 
void SetClustered (bool IsClusteredIn)
 
bool IsClustered () const
 
void SetClusteredTransform (const FTransform &TransformIn)
 
const FTransformGetClusteredTransform () const
 
void SetInitialParticleTransform (const FTransform &TransformIn)
 
const FTransformGetInitialParticleTransform () const
 
void SetComponentTransform (const FTransform &TransformIn)
 
const FTransformGetComponentTransform () const
 
void SetIntactTransform (const FTransform &TransformIn)
 
const FTransformGetIntactTransform () const
 
UE_API const FTransformGetParentRelativeTransform () const
 
void SetLocalLinearVelocity (const FVector &VelocityIn)
 
const FVectorGetLocalLinearVelocity () const
 
void SetLocalAngularVelocity (const FVector &VelocityIn)
 
const FVectorGetLocalAngularVelocity () const
 
UE_API ISimulationModuleBaseGetParent ()
 
UE_API ISimulationModuleBaseGetFirstChild ()
 
UE_API FVehicleBlackboardGetSimBlackboard ()
 
const FVectorGetAppliedForce ()
 
virtual TSharedPtr< FModuleNetDataGenerateNetData (const int32 NodeArrayIndex) const =0
 
virtual FSimOutputDataGenerateOutputData () const
 
UE_API Chaos::FPBDRigidClusteredParticleHandleGetClusterParticle (Chaos::FClusterUnionPhysicsProxy *Proxy)
 
UE_API Chaos::FPBDRigidParticleHandleGetParticleFromUniqueIndex (int32 ParticleUniqueIdx, TArray< Chaos::FPBDRigidParticleHandle * > &Particles)
 
- Public Member Functions inherited from Chaos::FSimulationModuleTypeContainer
void AddType (FName InType)
 
bool IsSimType (FName InType) const
 
FName GetSimType () const
 
template<typename U >
bool IsSimType () const
 
template<typename U >
U * Cast ()
 
template<typename U >
const U * Cast () const
 
- Public Member Functions inherited from Chaos::TSimulationModuleTypeableBase< ISimulationModuleBase >
 TSimulationModuleTypeableBase ()
 

Public Attributes

bool IsInitialized = false
 
- Public Attributes inherited from Chaos::FSimulationModuleTypeContainer
TSet< FNameMyTypes
 
FName MostRecentAdd = NAME_None
 

Static Public Attributes

static const int INVALID_IDX = -1
 

Protected Attributes

FSimModuleTreeSimModuleTree
 
int SimTreeIndex
 
eSimModuleState StateFlags
 
int TransformIndex
 
FUniqueIdx ParticleIdx
 
FTransform InitialParticleTransform
 
FTransform RelativeOffsetTransform
 
FTransform ComponentTransform
 
FTransform ClusteredCOMRelativeTransform
 
FTransform IntactCOMRelativeTransform
 
FVector LocalLinearVelocity
 
FVector LocalAngularVelocity
 
bool bClustered
 
bool bAnimationEnabled
 
FVector AnimationOffset
 
FSimModuleAnimationData AnimationData
 
FVector AppliedForce
 
int Guid
 
FPBDRigidClusteredParticleHandleCachedParticle
 

Additional Inherited Members

- Static Public Member Functions inherited from Chaos::FSimulationModuleTypeContainer
template<typename U >
static FName GetStaticSimType ()
 
- Static Public Member Functions inherited from Chaos::TSimulationModuleTypeableBase< ISimulationModuleBase >
static FName StaticSimTypeBase ()
 

Detailed Description

Interface base class for all simulation module building blocks

Constructor & Destructor Documentation

◆ ISimulationModuleBase()

Chaos::ISimulationModuleBase::ISimulationModuleBase ( )
inline

◆ ~ISimulationModuleBase()

virtual Chaos::ISimulationModuleBase::~ISimulationModuleBase ( )
inlinevirtual

Member Function Documentation

◆ AddForceAtCOMPosition()

void Chaos::ISimulationModuleBase::AddForceAtCOMPosition ( const FVector Force,
const FVector OffsetFromCOM = FVector::ZeroVector,
bool  bAllowSubstepping = true,
bool  bLevelSlope = false,
const FColor DebugColorIn = FColor::Blue 
)

◆ AddLocalForce()

void Chaos::ISimulationModuleBase::AddLocalForce ( const FVector Force,
bool  bAllowSubstepping = true,
bool  bIsLocalForce = false,
bool  bLevelSlope = false,
const FColor DebugColorIn = FColor::Blue 
)

Force application function, handles deferred force application and applying the force at the collect location based on whether the GC cluster is intact or fractured Note: forces are applied in local coordinates of the module

◆ AddLocalForceAtPosition()

void Chaos::ISimulationModuleBase::AddLocalForceAtPosition ( const FVector Force,
const FVector Position,
bool  bAllowSubstepping = true,
bool  bIsLocalForce = false,
bool  bLevelSlope = false,
const FColor DebugColorIn = FColor::Blue 
)

Force application function, handles deferred force application and applying the force at the collect location based on whether the GC cluster is intact or fractured Note: forces are applied in local coordinates of the module

◆ AddLocalTorque()

void Chaos::ISimulationModuleBase::AddLocalTorque ( const FVector Torque,
bool  bAllowSubstepping = true,
bool  bAccelChangeIn = true,
const FColor DebugColorIn = FColor::Magenta 
)

Torque application function Note: forces are applied in local coordinates of the module

◆ Animate()

virtual void Chaos::ISimulationModuleBase::Animate ( )
inlinevirtual

Animate/modify the childToParent transforms, to say rotate a wheel, or rudder, etc

Reimplemented in Chaos::FAerofoilSimModule, Chaos::FThrusterSimModule, and Chaos::FWheelSimModule.

◆ DEFINE_CHAOSSIMTYPENAME()

Chaos::ISimulationModuleBase::DEFINE_CHAOSSIMTYPENAME ( ISimulationModuleBase  )

◆ DrawDebugInfo()

virtual void Chaos::ISimulationModuleBase::DrawDebugInfo ( )
inlinevirtual

Option to draw debug for this module requires CVar p.Chaos.DebugDraw.Enabled 1

◆ GenerateNetData()

◆ GenerateOutputData()

virtual FSimOutputData * Chaos::ISimulationModuleBase::GenerateOutputData ( ) const
inlinevirtual

◆ GetAnimationData()

const FSimModuleAnimationData & Chaos::ISimulationModuleBase::GetAnimationData ( ) const
inline

◆ GetAnimationOffset()

const FVector & Chaos::ISimulationModuleBase::GetAnimationOffset ( ) const
inline

◆ GetAnimationSetupIndex()

int Chaos::ISimulationModuleBase::GetAnimationSetupIndex ( )
inline

◆ GetAppliedForce()

const FVector & Chaos::ISimulationModuleBase::GetAppliedForce ( )
inline

◆ GetBoneName()

const FName & Chaos::ISimulationModuleBase::GetBoneName ( ) const
inline

◆ GetClusteredTransform()

const FTransform & Chaos::ISimulationModuleBase::GetClusteredTransform ( ) const
inline

◆ GetClusterParticle()

FPBDRigidClusteredParticleHandle * Chaos::ISimulationModuleBase::GetClusterParticle ( Chaos::FClusterUnionPhysicsProxy Proxy)

◆ GetComponentTransform()

const FTransform & Chaos::ISimulationModuleBase::GetComponentTransform ( ) const
inline

◆ GetDebugName()

virtual const FString Chaos::ISimulationModuleBase::GetDebugName ( ) const
pure virtual

◆ GetDebugString()

bool Chaos::ISimulationModuleBase::GetDebugString ( FString &  StringOut) const
virtual

Option to return debug text for drawing on the HUD in the Game Thread

Reimplemented in Chaos::FClutchSimModule, Chaos::FEngineSimModule, Chaos::FTransmissionSimModule, and Chaos::FWheelSimModule.

◆ GetFirstChild()

ISimulationModuleBase * Chaos::ISimulationModuleBase::GetFirstChild ( )

◆ GetGuid()

int Chaos::ISimulationModuleBase::GetGuid ( ) const
inline

◆ GetInitialParticleTransform()

const FTransform & Chaos::ISimulationModuleBase::GetInitialParticleTransform ( ) const
inline

◆ GetIntactTransform()

const FTransform & Chaos::ISimulationModuleBase::GetIntactTransform ( ) const
inline

◆ GetLocalAngularVelocity()

const FVector & Chaos::ISimulationModuleBase::GetLocalAngularVelocity ( ) const
inline

◆ GetLocalLinearVelocity()

const FVector & Chaos::ISimulationModuleBase::GetLocalLinearVelocity ( ) const
inline

◆ GetParent()

ISimulationModuleBase * Chaos::ISimulationModuleBase::GetParent ( )

◆ GetParentRelativeTransform()

const FTransform & Chaos::ISimulationModuleBase::GetParentRelativeTransform ( ) const

The modules transform relative to the simulating body will depend on whether the GC is intact (get the transform relative to intact cluster) or fractured (transform relative to fractured part)

◆ GetParticleFromUniqueIndex()

FPBDRigidParticleHandle * Chaos::ISimulationModuleBase::GetParticleFromUniqueIndex ( int32  ParticleUniqueIdx,
TArray< Chaos::FPBDRigidParticleHandle * > &  Particles 
)

◆ GetParticleIndex()

const FUniqueIdx Chaos::ISimulationModuleBase::GetParticleIndex ( ) const
inline

◆ GetSimBlackboard()

FVehicleBlackboard * Chaos::ISimulationModuleBase::GetSimBlackboard ( )

◆ GetTransformIndex()

const int Chaos::ISimulationModuleBase::GetTransformIndex ( ) const
inline

◆ GetTreeIndex()

int Chaos::ISimulationModuleBase::GetTreeIndex ( ) const
inline

◆ IsAnimationEnabled()

bool Chaos::ISimulationModuleBase::IsAnimationEnabled ( )
inline

◆ IsBehaviourType()

virtual bool Chaos::ISimulationModuleBase::IsBehaviourType ( eSimModuleTypeFlags  InType) const
pure virtual

◆ IsClustered()

bool Chaos::ISimulationModuleBase::IsClustered ( ) const
inline

◆ IsEnabled()

virtual bool Chaos::ISimulationModuleBase::IsEnabled ( ) const
inlinevirtual

Is Module active and simulating

◆ OnConstruction_External()

virtual void Chaos::ISimulationModuleBase::OnConstruction_External ( const Chaos::FPhysicsObjectHandle PhysicsObject)
inlinevirtual

◆ OnContactModification()

virtual void Chaos::ISimulationModuleBase::OnContactModification ( Chaos::FCollisionContactModifier Modifier,
IPhysicsProxyBase Proxy 
)
inlinevirtual

◆ OnTermination_External()

virtual void Chaos::ISimulationModuleBase::OnTermination_External ( )
inlinevirtual

◆ SetAnimationData()

void Chaos::ISimulationModuleBase::SetAnimationData ( const FName BoneNameIn,
const FVector AnimationOffsetIn,
int  AnimationSetupIndexIn 
)

◆ SetAnimationEnabled()

void Chaos::ISimulationModuleBase::SetAnimationEnabled ( bool  bInEnabled)
inline

◆ SetClustered()

void Chaos::ISimulationModuleBase::SetClustered ( bool  IsClusteredIn)
inline

Let the module know if it is still clustered or not

◆ SetClusteredTransform()

void Chaos::ISimulationModuleBase::SetClusteredTransform ( const FTransform TransformIn)
inline

Set the COM relative transform of module when it is clustered, so relative to parent COM

◆ SetComponentTransform()

void Chaos::ISimulationModuleBase::SetComponentTransform ( const FTransform TransformIn)
inline

◆ SetGuid()

void Chaos::ISimulationModuleBase::SetGuid ( int  GuidIn)
inline

◆ SetInitialParticleTransform()

void Chaos::ISimulationModuleBase::SetInitialParticleTransform ( const FTransform TransformIn)
inline

◆ SetIntactTransform()

void Chaos::ISimulationModuleBase::SetIntactTransform ( const FTransform TransformIn)
inline

Set the COM relative transform of module when it is broken off, so relative to itself

◆ SetLocalAngularVelocity()

void Chaos::ISimulationModuleBase::SetLocalAngularVelocity ( const FVector VelocityIn)
inline

◆ SetLocalLinearVelocity()

void Chaos::ISimulationModuleBase::SetLocalLinearVelocity ( const FVector VelocityIn)
inline

Update the module with its current velocity

◆ SetParticleIndex()

void Chaos::ISimulationModuleBase::SetParticleIndex ( FUniqueIdx  ParticleIndexIn)
inline

The Particle unique index, should be valid on game and physics threads

◆ SetSimModuleTree()

void Chaos::ISimulationModuleBase::SetSimModuleTree ( FSimModuleTree SimModuleTreeIn)
inline

Very useful to store the simulation tree pointer in which we are stored, then we can access other modules that we reference through an index

◆ SetStateFlags()

void Chaos::ISimulationModuleBase::SetStateFlags ( eSimModuleState  StateFlagsIn)
inline

◆ SetTransformIndex()

void Chaos::ISimulationModuleBase::SetTransformIndex ( int  TransformIndexIn)
inline

The transform index references the transform collection, mapping the simulation module to the geometry collection data

◆ SetTreeIndex()

void Chaos::ISimulationModuleBase::SetTreeIndex ( int  TreeIndexIn)
inline

The modules own index in the simulation tree array

◆ Simulate() [1/2]

virtual void Chaos::ISimulationModuleBase::Simulate ( float  DeltaTime,
const FAllInputs Inputs,
FSimModuleTree VehicleModuleSystem 
)
inlinevirtual

◆ Simulate() [2/2]

virtual void Chaos::ISimulationModuleBase::Simulate ( IPhysicsProxyBase Proxy,
Chaos::FPBDRigidParticleHandle ParticleHandle,
float  DeltaTime,
const FAllInputs Inputs,
FSimModuleTree VehicleModuleSystem 
)
inlinevirtual

The main Simulation function that is called from the physics async callback thread

Member Data Documentation

◆ AnimationData

FSimModuleAnimationData Chaos::ISimulationModuleBase::AnimationData
protected

◆ AnimationOffset

FVector Chaos::ISimulationModuleBase::AnimationOffset
protected

◆ AppliedForce

FVector Chaos::ISimulationModuleBase::AppliedForce
protected

◆ bAnimationEnabled

bool Chaos::ISimulationModuleBase::bAnimationEnabled
protected

◆ bClustered

bool Chaos::ISimulationModuleBase::bClustered
protected

◆ CachedParticle

FPBDRigidClusteredParticleHandle* Chaos::ISimulationModuleBase::CachedParticle
protected

◆ ClusteredCOMRelativeTransform

FTransform Chaos::ISimulationModuleBase::ClusteredCOMRelativeTransform
protected

◆ ComponentTransform

FTransform Chaos::ISimulationModuleBase::ComponentTransform
protected

◆ Guid

int Chaos::ISimulationModuleBase::Guid
protected

◆ InitialParticleTransform

FTransform Chaos::ISimulationModuleBase::InitialParticleTransform
protected

◆ IntactCOMRelativeTransform

FTransform Chaos::ISimulationModuleBase::IntactCOMRelativeTransform
protected

◆ INVALID_IDX

const int Chaos::ISimulationModuleBase::INVALID_IDX = -1
static

◆ IsInitialized

bool Chaos::ISimulationModuleBase::IsInitialized = false

◆ LocalAngularVelocity

FVector Chaos::ISimulationModuleBase::LocalAngularVelocity
protected

◆ LocalLinearVelocity

FVector Chaos::ISimulationModuleBase::LocalLinearVelocity
protected

◆ ParticleIdx

FUniqueIdx Chaos::ISimulationModuleBase::ParticleIdx
protected

◆ RelativeOffsetTransform

FTransform Chaos::ISimulationModuleBase::RelativeOffsetTransform
protected

◆ SimModuleTree

FSimModuleTree* Chaos::ISimulationModuleBase::SimModuleTree
protected

◆ SimTreeIndex

int Chaos::ISimulationModuleBase::SimTreeIndex
protected

◆ StateFlags

eSimModuleState Chaos::ISimulationModuleBase::StateFlags
protected

◆ TransformIndex

int Chaos::ISimulationModuleBase::TransformIndex
protected

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