3#include <Core/World/ComponentManager.h>
4#include <GameEngine/Physics/ClothSheetSimulator.h>
5#include <JoltPlugin/JoltPluginDLL.h>
6#include <RendererCore/Components/RenderComponent.h>
7#include <RendererCore/Meshes/MeshBufferResource.h>
8#include <RendererCore/Pipeline/RenderData.h>
9#include <RendererCore/Pipeline/Renderer.h>
36 plUInt32 m_uiUniqueID = 0;
40 plUInt16 m_uiVerticesX;
41 plUInt16 m_uiVerticesY;
62 void CreateVertexBuffer();
70 using StorageType = plUInt16;
74 FixedCornerTopLeft = PL_BIT(0),
75 FixedCornerTopRight = PL_BIT(1),
76 FixedCornerBottomRight = PL_BIT(2),
77 FixedCornerBottomLeft = PL_BIT(3),
78 FixedEdgeTop = PL_BIT(4),
79 FixedEdgeRight = PL_BIT(5),
80 FixedEdgeBottom = PL_BIT(6),
81 FixedEdgeLeft = PL_BIT(7),
83 Default = FixedEdgeTop
88 StorageType FixedCornerTopLeft : 1;
89 StorageType FixedCornerTopRight : 1;
90 StorageType FixedCornerBottomRight : 1;
91 StorageType FixedCornerBottomLeft : 1;
92 StorageType FixedEdgeTop : 1;
93 StorageType FixedEdgeRight : 1;
94 StorageType FixedEdgeBottom : 1;
95 StorageType FixedEdgeLeft : 1;
115 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
116 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
119 virtual void OnActivated()
override;
120 virtual void OnSimulationStarted()
override;
121 virtual void OnDeactivated()
override;
140 void SetSize(
plVec2 vVal);
141 plVec2 GetSize()
const {
return m_vSize; }
150 plVec2U32 GetSegments()
const {
return m_vSegments; }
153 plUInt8 m_uiCollisionLayer = 0;
156 float m_fGravityFactor = 1.0f;
159 float m_fWindInfluence = 0.3f;
162 float m_fDamping = 0.5f;
165 float m_fThickness = 0.05f;
174 void SetMaterialFile(
const char* szFile);
175 const char* GetMaterialFile()
const;
186 void UpdateBodyBounds();
193 plUInt8 m_uiSleepCounter = 0;
195 plUInt32 m_uiJoltBodyID = plInvalidIndex;
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
static const plColor White
#FFFFFF
Definition Color.h:194
Definition ComponentManager.h:88
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Simulates a rectangular piece of cloth.
Definition JoltClothSheetComponent.h:108
Definition JoltClothSheetComponent.h:17
Definition JoltClothSheetComponent.h:32
Definition JoltClothSheetComponent.h:48
Base class for objects that should be rendered.
Definition RenderComponent.h:9
Definition RenderDataBatch.h:6
Base class for all render data. Render data must contain all information that is needed to render the...
Definition RenderData.h:14
Definition RenderPipelinePass.h:26
This is the base class for types that handle rendering of different object types.
Definition Renderer.h:9
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
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
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
Definition JoltClothSheetComponent.h:87
Flags for how a piece of cloth should be simulated.
Definition JoltClothSheetComponent.h:69
Enum
Definition JoltClothSheetComponent.h:73
Definition UpdateLocalBoundsMessage.h:9
Definition RenderData.h:19
Definition Declarations.h:51
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition WorldModule.h:33