3#include <Core/ResourceManager/ResourceHandle.h>
4#include <JoltPlugin/JoltPluginDLL.h>
18 using StorageType = plInt8;
64 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
65 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
69 virtual void OnActivated()
override;
70 virtual void OnDeactivated()
override;
80 void SetGravityFactor(
float fGravity);
81 float GetGravityFactor()
const {
return m_fGravityFactor; }
84 void SetSurfaceFile(
const char* szFile);
85 const char* GetSurfaceFile()
const;
88 plUInt8 m_uiCollisionLayer = 0;
91 plUInt16 m_uiPieces = 16;
94 float m_fThickness = 0.05f;
97 float m_fSlack = 0.3f;
110 void SetAnchor1Reference(
const char* szReference);
113 void SetAnchor2Reference(
const char* szReference);
141 void DestroyPhysicsShapes();
143 void SendPreviewPose();
146 void UpdatePreview();
156 float m_fTotalMass = 1.0f;
157 float m_fMaxForcePerFrame = 0.0f;
158 float m_fBendStiffness = 0.0f;
159 plUInt32 m_uiObjectFilterID = plInvalidIndex;
160 plUInt32 m_uiUserDataIndex = plInvalidIndex;
161 bool m_bSelfCollision =
false;
162 float m_fGravityFactor = 1.0f;
163 plUInt32 m_uiPreviewHash = 0;
165 JPH::Ragdoll* m_pRagdoll =
nullptr;
166 JPH::Constraint* m_pConstraintAnchor1 =
nullptr;
167 JPH::Constraint* m_pConstraintAnchor2 =
nullptr;
168 plUInt32 m_uiAnchor1BodyID = plInvalidIndex;
169 plUInt32 m_uiAnchor2BodyID = plInvalidIndex;
173 const char* DummyGetter()
const {
return nullptr; }
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
static constexpr plAngle MakeFromDegree(float fDegree)
Creates an instance of plAngle that was initialized from degree. (Performs a conversion)
Definition Angle_inl.h:33
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
Definition DynamicArray.h:81
Definition JoltMaterial.h:7
Creates a physically simulated rope that is made up of multiple segments.
Definition JoltRopeComponent.h:57
Definition JoltRopeComponent.h:36
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
virtual void OnSimulationStarted()
This method is called at the start of the next world update when the world is simulated....
Definition WorldModule.h:105
virtual void Initialize()
This method is called after the constructor. A derived type can override this method to do initializa...
Definition WorldModule.h:98
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 custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
A handle to a game object.
Definition Declarations.h:76
This message can be sent to a constraint component to break the constraint.
Definition Declarations.h:90
How a rope end gets attached to the anchor point.
Definition JoltRopeComponent.h:17
Enum
Definition JoltRopeComponent.h:21
@ None
The rope is not attached at this anchor and will fall down here once simulation starts.
Definition JoltRopeComponent.h:22
@ Point
The rope end can rotate freely around the anchor point.
Definition JoltRopeComponent.h:23
@ Fixed
The rope end can neither move nor rotate at the anchor point.
Definition JoltRopeComponent.h:24
@ Cone
The rope end can rotate up to a maximum angle at the anchor point.
Definition JoltRopeComponent.h:25
Used to apply a physical force on the object.
Definition PhysicsWorldModule.h:201
Used to apply a physical impulse on the object.
Definition PhysicsWorldModule.h:187
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition WorldModule.h:33