3#include <Core/World/ComponentManager.h>
4#include <GameEngine/Physics/ClothSheetSimulator.h>
5#include <RendererCore/Components/RenderComponent.h>
6#include <RendererCore/Meshes/MeshBufferResource.h>
7#include <RendererCore/Pipeline/RenderData.h>
8#include <RendererCore/Pipeline/Renderer.h>
35 plUInt32 m_uiUniqueID = 0;
38 plUInt16 m_uiVerticesX;
39 plUInt16 m_uiVerticesY;
60 void CreateVertexBuffer();
68 using StorageType = plUInt16;
72 FixedCornerTopLeft = PL_BIT(0),
73 FixedCornerTopRight = PL_BIT(1),
74 FixedCornerBottomRight = PL_BIT(2),
75 FixedCornerBottomLeft = PL_BIT(3),
76 FixedEdgeTop = PL_BIT(4),
77 FixedEdgeRight = PL_BIT(5),
78 FixedEdgeBottom = PL_BIT(6),
79 FixedEdgeLeft = PL_BIT(7),
81 Default = FixedEdgeTop
86 StorageType FixedCornerTopLeft : 1;
87 StorageType FixedCornerTopRight : 1;
88 StorageType FixedCornerBottomRight : 1;
89 StorageType FixedCornerBottomLeft : 1;
90 StorageType FixedEdgeTop : 1;
91 StorageType FixedEdgeRight : 1;
92 StorageType FixedEdgeBottom : 1;
93 StorageType FixedEdgeLeft : 1;
113 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
114 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
117 virtual void OnActivated()
override;
118 virtual void OnSimulationStarted()
override;
119 virtual void OnDeactivated()
override;
138 void SetSize(
plVec2 vVal);
139 plVec2 GetSize()
const {
return m_vSize; }
148 plVec2U32 GetSegments()
const {
return m_vSegments; }
151 void SetSlack(
plVec2 vVal);
152 plVec2 GetSlack()
const {
return m_vSlack; }
155 float m_fWindInfluence = 0.3f;
158 float m_fDamping = 0.5f;
167 void SetMaterialFile(
const char* szFile);
168 const char* GetMaterialFile()
const;
181 plUInt8 m_uiSleepCounter = 0;
182 mutable plUInt8 m_uiVisibleCounter = 0;
183 plUInt8 m_uiCheckEquilibriumCounter = 0;
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Simulates a rectangular piece of cloth.
Definition ClothSheetComponent.h:106
Definition ClothSheetComponent.h:16
Definition ClothSheetComponent.h:31
Definition ClothSheetComponent.h:46
A simple simulator for swinging and hanging cloth.
Definition ClothSheetSimulator.h:16
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
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 ClothSheetComponent.h:85
Flags for how a piece of cloth should be simulated.
Definition ClothSheetComponent.h:67
Enum
Definition ClothSheetComponent.h:71
Definition UpdateLocalBoundsMessage.h:9
Definition Declarations.h:51
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition WorldModule.h:33