3#include <Core/World/ComponentManager.h>
4#include <JoltPlugin/Declarations.h>
21 using StorageType = plInt8;
38 using StorageType = plInt8;
95 void BreakConstraint();
98 void SetBreakForce(
float value);
99 float GetBreakForce()
const {
return m_fBreakForce; }
102 void SetBreakTorque(
float value);
103 float GetBreakTorque()
const {
return m_fBreakTorque; }
106 void SetPairCollision(
bool value);
107 bool GetPairCollision()
const {
return m_bPairCollision; }
109 void SetParentActorReference(
const char* szReference);
110 void SetChildActorReference(
const char* szReference);
111 void SetChildActorAnchorReference(
const char* szReference);
129 virtual bool ExceededBreakingPoint() = 0;
130 virtual void ApplySettings() = 0;
135 virtual void CreateContstraintType(JPH::Body* pBody0, JPH::Body* pBody1) = 0;
140 void QueueApplySettings();
151 JPH::Constraint* m_pConstraint =
nullptr;
153 float m_fBreakForce = 0.0f;
154 float m_fBreakTorque = 0.0f;
155 bool m_bPairCollision =
true;
158 const char* DummyGetter()
const {
return nullptr; }
Base class of all component types.
Definition Component.h:25
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void OnSimulationStarted()
This method is called once for active components, at the start of the next world update,...
Definition Component.cpp:144
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Base class for all Jolt physics joints (constraints).
Definition JoltConstraintComponent.h:73
Turns an object into a fully physically simulated movable object.
Definition JoltDynamicActorComponent.h:35
Definition JoltWorldModule.h:29
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
A handle to a game object.
Definition Declarations.h:76
Configures how a drive on a constraint works.
Definition JoltConstraintComponent.h:37
Enum
Definition JoltConstraintComponent.h:41
@ DrivePosition
The drive attempts to reach a target position (or angle).
Definition JoltConstraintComponent.h:44
@ DriveVelocity
The drive attempts to reach a target velocity (of rotation or motion).
Definition JoltConstraintComponent.h:43
@ NoDrive
The constraint has no drive.
Definition JoltConstraintComponent.h:42
Configures how a physics constraint's limit acts.
Definition JoltConstraintComponent.h:20
Enum
Definition JoltConstraintComponent.h:24
@ NoLimit
The constraint has no limit.
Definition JoltConstraintComponent.h:25
@ HardLimit
The constraint has a hard limit, no soft spring is used to prevent further movement.
Definition JoltConstraintComponent.h:26
This message can be sent to a constraint component to break the constraint.
Definition Declarations.h:90
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54