Navigation
API > API/Runtime > API/Runtime/ChaosVehiclesCore > API/Runtime/ChaosVehiclesCore/SimModule
Inheritance Hierarchy
- FSimulationModuleTypeContainer
- TSimulationModuleTypeableBase
- ISimulationModuleBase
- FAerofoilSimModule
- FChassisSimModule
- FSuspensionBaseInterface
- FSuspensionSimModule
- FThrusterSimModule
- FTorqueSimModule
- FAxleSimModule
- FClutchSimModule
- FEngineSimModule
- FMotorSimModule
- FTransmissionSimModule
- FWheelBaseInterface
- FWheelSimModule
References
| Module | ChaosVehiclesCore |
| Header | /Engine/Source/Runtime/Experimental/ChaosVehicles/ChaosVehiclesCore/Public/SimModule/SimulationModuleBase.h |
| Include | #include "SimModule/SimulationModuleBase.h" |
Syntax
class ISimulationModuleBase :
public Chaos::FSimulationModuleTypeContainer ,
public Chaos::TSimulationModuleTypeableBase< ISimulationModuleBase >
Remarks
Interface base class for all simulation module building blocks
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector | AnimationOffset | ||
| FVector | AnimationRotation | ||
| int | AnimationSetupIndex | ||
| FVector | AppliedForce | For headless chaos testing | |
| bool | bAnimationEnabled | ||
| bool | bClustered | ||
| FName | BoneName | ||
| FPBDRigidClusteredParticleHandle * | CachedParticle | ||
| FTransform | ClusteredCOMRelativeTransform | ||
| FTransform | ComponentTransform | ||
| int | Guid | ||
| FTransform | InitialParticleTransform | ||
| FTransform | IntactCOMRelativeTransform | ||
| bool | IsInitialized | ||
| FVector | LocalAngularVelocity | ||
| FVector | LocalLinearVelocity | ||
| FUniqueIdx | ParticleIdx | ||
| FTransform | RelativeOffsetTransform | ||
| FSimModuleTree * | SimModuleTree | ||
| int | SimTreeIndex | ||
| eSimModuleState | StateFlags | ||
| int | TransformIndex |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FName | |||
| void | AddForceAtCOMPosition
(
const FVector& Force, |
||
| void | AddLocalForce
(
const FVector& Force, |
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 | |
| void | AddLocalForceAtPosition
(
const FVector& Force, |
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 | |
| void | AddLocalTorque
(
const FVector& Torque, |
Torque application function Note: forces are applied in local coordinates of the module | |
| void | Animate
(
Chaos::FClusterUnionPhysicsProxy* Proxy |
Animate/modify the childToParent transforms, to say rotate a wheel, or rudder, etc | |
| void | Option to draw debug for this module requires CVar p.Chaos.DebugDraw.Enabled 1 | ||
| TSharedPtr< FModuleNetData > | GenerateNetData
(
const int32 NodeArrayIndex |
This is the replication datas | |
| FSimOutputData * | |||
| const FVector & | |||
| int | |||
| const FVector & | For headless chaos testing | ||
| const FName & | GetBoneName () |
||
| const FTransform & | |||
| Chaos::FPBDRigidClusteredParticleHandle * | Void SetClusterParticle(FPBDRigidClusteredParticleHandle* ParticleIn) { ClusterParticle = ParticleIn; } | ||
| const FTransform & | |||
| const FString | GetDebugName () |
Get the friendly name for this module, primarily for logging & debugging module tree | |
| bool | GetDebugString
(
FString& StringOut |
Option to return debug text for drawing on the HUD in the Game Thread | |
| ISimulationModuleBase * | |||
| const int | GetGuid () |
||
| const FTransform & | |||
| const FTransform & | |||
| const FVector & | |||
| const FVector & | |||
| ISimulationModuleBase * | GetParent () |
||
| const FTransform & | 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) | ||
| Chaos::FPBDRigidParticleHandle * | GetParticleFromUniqueIndex
(
int32 ParticleUniqueIdx, |
||
| const FUniqueIdx | |||
| FVehicleBlackboard * | |||
| const int | |||
| int | GetTreeIndex () |
||
| bool | |||
| bool | IsBehaviourType
(
eSimModuleTypeFlags InType |
Is Module of a specific behavioral data type | |
| bool | IsClustered () |
||
| bool | IsEnabled () |
Is Module active and simulating | |
| void | Any post construction initialisation - called from Game Thread | ||
| void | OnContactModification
(
Chaos::FCollisionContactModifier& Modifier, |
||
| void | Any cleaning up required - called from game thread | ||
| void | SetAnimationData
(
const FName& BoneNameIn, |
||
| void | SetAnimationEnabled
(
bool bInEnabled |
||
| void | SetClustered
(
bool IsClusteredIn |
Let the module know if it is still clustered or not | |
| void | SetClusteredTransform
(
const FTransform& TransformIn |
Set the COM relative transform of module when it is clustered, so relative to parent COM | |
| void | SetComponentTransform
(
const FTransform& TransformIn |
||
| void | SetGuid
(
int GuidIn |
||
| void | SetInitialParticleTransform
(
const FTransform& TransformIn |
||
| void | SetIntactTransform
(
const FTransform& TransformIn |
Set the COM relative transform of module when it is broken off, so relative to itself | |
| void | SetLocalAngularVelocity
(
const FVector& VelocityIn |
||
| void | SetLocalLinearVelocity
(
const FVector& VelocityIn |
Update the module with its current velocity | |
| void | SetParticleIndex
(
FUniqueIdx ParticleIndexIn |
The Particle unique index, should be valid on game and physics threads | |
| void | SetSimModuleTree
(
FSimModuleTree* SimModuleTreeIn |
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 | |
| void | SetStateFlags
(
eSimModuleState StateFlagsIn |
Set Module state, if simulating or not | |
| void | SetTransformIndex
(
int TransformIndexIn |
The transform index references the transform collection, mapping the simulation module to the geometry collection data | |
| void | SetTreeIndex
(
int TreeIndexIn |
The modules own index in the simulation tree array | |
| void | Simulate
(
float DeltaTime, |
The main Simulation function that is called from the physics async callback thread | |
| void | Simulate
(
Chaos::FClusterUnionPhysicsProxy* Proxy, |
The main Simulation function that is called from the physics async callback thread |
Constants
| Name | Description |
|---|---|
| INVALID_IDX |