Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltShapeCylinderComponent.h
1#pragma once
2
3#include <JoltPlugin/Shapes/JoltShapeComponent.h>
4
6
12class PL_JOLTPLUGIN_DLL plJoltShapeCylinderComponent : public plJoltShapeComponent
13{
15
17 // plComponent
18
19public:
20 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
21 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
22
23
25 // plJoltShapeComponent
26
27protected:
28 virtual void CreateShapes(plDynamicArray<plJoltSubShape>& out_Shapes, const plTransform& rootTransform, float fDensity, const plJoltMaterial* pMaterial) override;
29
30
32 // plJoltShapeCylinderComponent
33
34public:
37
38 void SetRadius(float f); // [ property ]
39 float GetRadius() const { return m_fRadius; } // [ property ]
40
41 void SetHeight(float f); // [ property ]
42 float GetHeight() const { return m_fHeight; } // [ property ]
43
44protected:
45 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg) const;
46
47 float m_fRadius = 0.5f;
48 float m_fHeight = 0.5f;
49};
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 ComponentManager.h:88
Definition DynamicArray.h:81
Definition JoltMaterial.h:7
Base class for all Jolt physics shapes.
Definition JoltShapeComponent.h:31
Adds a Jolt cylinder shape to a Jolt actor.
Definition JoltShapeCylinderComponent.h:13
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 UpdateLocalBoundsMessage.h:9