Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltSettingsComponent.h
1#pragma once
2
3#include <Core/World/SettingsComponent.h>
4#include <Core/World/SettingsComponentManager.h>
5#include <JoltPlugin/Declarations.h>
6
8
9class PL_JOLTPLUGIN_DLL plJoltSettingsComponent : public plSettingsComponent
10{
12
14 // plComponent
15
16public:
17 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
18 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
19
20
22 // plJoltSettingsComponent
23
24public:
27
28 const plJoltSettings& GetSettings() const { return m_Settings; }
29
30 const plVec3& GetObjectGravity() const { return m_Settings.m_vObjectGravity; } // [ property ]
31 void SetObjectGravity(const plVec3& v); // [ property ]
32
33 const plVec3& GetCharacterGravity() const { return m_Settings.m_vCharacterGravity; } // [ property ]
34 void SetCharacterGravity(const plVec3& v); // [ property ]
35
36 plJoltSteppingMode::Enum GetSteppingMode() const { return m_Settings.m_SteppingMode; } // [ property ]
37 void SetSteppingMode(plJoltSteppingMode::Enum mode); // [ property ]
38
39 float GetFixedFrameRate() const { return m_Settings.m_fFixedFrameRate; } // [ property ]
40 void SetFixedFrameRate(float fFixedFrameRate); // [ property ]
41
42 plUInt32 GetMaxSubSteps() const { return m_Settings.m_uiMaxSubSteps; } // [ property ]
43 void SetMaxSubSteps(plUInt32 uiMaxSubSteps); // [ property ]
44
45 plUInt32 GetMaxBodies() const { return m_Settings.m_uiMaxBodies; } // [ property ]
46 void SetMaxBodies(plUInt32 uiMaxBodies); // [ property ]
47
48protected:
49 plJoltSettings m_Settings;
50};
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 DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Definition JoltSettingsComponent.h:10
Base class for settings components, of which only one per type should exist in each world.
Definition SettingsComponent.h:13
A component manager that does no update at all on components and expects only a single instance to be...
Definition SettingsComponentManager.h:14
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
Definition Declarations.h:75