Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltShapeSphereComponent.h
1#pragma once
2
3#include <JoltPlugin/Shapes/JoltShapeComponent.h>
4
6
8class PL_JOLTPLUGIN_DLL plJoltShapeSphereComponent : 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
26 // plJoltShapeSphereComponent
27
28public:
31
32 void SetRadius(float f); // [ property ]
33 float GetRadius() const { return m_fRadius; } // [ property ]
34
35protected:
36 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg) const;
37
38 float m_fRadius = 0.5f;
39};
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 sphere shape to a Jolt actor.
Definition JoltShapeSphereComponent.h:9
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