Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltShapeBoxComponent.h
1#pragma once
2
3#include <JoltPlugin/Shapes/JoltShapeComponent.h>
4
6
8class PL_JOLTPLUGIN_DLL plJoltShapeBoxComponent : 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 // plJoltShapeBoxComponent
28
29public:
32
33 void SetHalfExtents(const plVec3& value); // [ property ]
34 const plVec3& GetHalfExtents() const { return m_vHalfExtents; } // [ property ]
35
36 virtual void ExtractGeometry(plMsgExtractGeometry& ref_msg) const override;
37
38protected:
39 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg) const;
40
41 plVec3 m_vHalfExtents = plVec3(0.5f);
42};
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 box shape to a Jolt actor.
Definition JoltShapeBoxComponent.h:9
Base class for all Jolt physics shapes.
Definition JoltShapeComponent.h:31
virtual void ExtractGeometry(plMsgExtractGeometry &ref_msg) const
If overridden, a triangular representation of the physics shape is added to the geometry object.
Definition JoltShapeComponent.h:53
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
Sent by plWorldGeoExtractionUtil to gather geometry information about objects in a world.
Definition WorldGeoExtractionUtil.h:56
Definition UpdateLocalBoundsMessage.h:9