Navigation
API > API/Runtime > API/Runtime/ChaosVehiclesCore > API/Runtime/ChaosVehiclesCore/SimModule
Inheritance Hierarchy
- ISimulationModuleBase
- FAerofoilSimModule
- FChassisSimModule
- FSuspensionSimModule
- FThrusterSimModule
- FTorqueSimModule
- FAxleSimModule
- FClutchSimModule
- FEngineSimModule
- FMotorSimModule
- FTransmissionSimModule
- FWheelSimModule
References
| Module | ChaosVehiclesCore |
| Header | /Engine/Source/Runtime/Experimental/ChaosVehicles/ChaosVehiclesCore/Public/SimModule/SimulationModuleBase.h |
| Include | #include "SimModule/SimulationModuleBase.h" |
Syntax
class ISimulationModuleBase
Remarks
Interface base class for all simulation module building blocks
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector | AppliedForce | For headless chaos testing | |
| bool | bClustered | ||
| FTransform | ClusteredCOMRelativeTransform | ||
| FTransform | IntactCOMRelativeTransform | ||
| FVector | ModuleLocalVelocity | ||
| FSimModuleTree * | SimModuleTree | ||
| int | SimTreeIndex | ||
| eSimModuleState | StateFlags | ||
| int | TransformIndex |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| 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 | Option to draw debug for this module requires CVar p.Chaos.DebugDraw.Enabled 1 | ||
| const FVector & | For headless chaos testing | ||
| 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 FTransform & | |||
| 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) | ||
| eSimType | GetSimType () |
The specific simulation type | |
| const int | |||
| int | GetTreeIndex () |
||
| bool | IsBehaviourType
(
eSimModuleTypeFlags InType |
Is Module of a specific behavioral data type | |
| bool | IsClustered () |
||
| bool | IsEnabled () |
Is Module active and simulating | |
| 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 | SetIntactTransform
(
const FTransform& TransformIn |
Set the COM relative transform of module when it is broken off, so relative to itself | |
| void | SetLocalVelocity
(
const FVector& VelocityIn |
Update the module with its current velocity | |
| 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 |
Constants
| Name | Description |
|---|---|
| INVALID_INDEX |