3#include <JoltPlugin/Actors/JoltActorComponent.h>
17 void UpdateKinematicActors(
plTime deltaTime);
18 void UpdateDynamicActors();
42 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
43 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
47 virtual void OnDeactivated()
override;
76 void SetKinematic(
bool b);
77 bool GetKinematic()
const {
return m_bKinematic; }
82 void SetGravityFactor(
float fFactor);
83 float GetGravityFactor()
const {
return m_fGravityFactor; }
85 void SetSurfaceFile(
const char* szFile);
86 const char* GetSurfaceFile()
const;
94 bool m_bStartAsleep =
false;
97 float m_fInitialMass = 0.0f;
100 float m_fDensity = 1.0f;
103 float m_fLinearDamping = 0.1f;
106 float m_fAngularDamping = 0.05f;
119 bool GetUseCustomCoM()
const {
return GetUserFlag(0); }
122 void AddLinearForce(
const plVec3& vForce);
125 void AddLinearImpulse(
const plVec3& vImpulse);
128 void AddAngularForce(
const plVec3& vForce);
131 void AddAngularImpulse(
const plVec3& vImpulse);
144 float GetMass()
const;
149 bool m_bKinematic =
false;
150 float m_fGravityFactor = 1.0f;
Definition ComponentManager.h:88
Definition DynamicArray.h:81
Base class for all Jolt actors.
Definition JoltActorComponent.h:23
Turns an object into a fully physically simulated movable object.
Definition JoltDynamicActorComponent.h:35
plSurfaceResourceHandle m_hSurface
Which surface to use for all shapes. The surface defines various physical properties and interactions...
Definition JoltDynamicActorComponent.h:109
void SetUseCustomCoM(bool b)
Whether a custom center-of-mass shall be used.
Definition JoltDynamicActorComponent.h:118
plBitflags< plOnJoltContact > m_OnContact
What reactions should be triggered when an actor gets into contact with another.
Definition JoltDynamicActorComponent.h:112
Definition JoltDynamicActorComponent.h:8
Definition JoltMaterial.h:7
Definition JoltWorldModule.h:29
Definition SmallArray.h:219
static plVec3Template< float > MakeZero()
Definition Vec3.h:38
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
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
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
A handle to a component.
Definition Declarations.h:138
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
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12