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