Plasma Engine  2.0
Loading...
Searching...
No Matches
JoltShapeConvexHullComponent.h
1#pragma once
2
3#include <JoltPlugin/Resources/JoltMeshResource.h>
4#include <JoltPlugin/Shapes/JoltShapeComponent.h>
5
7
13{
15
17 // plComponent
18
19public:
20 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
21 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
22
24 // plJoltShapeComponent
25
26protected:
27 virtual void CreateShapes(plDynamicArray<plJoltSubShape>& out_Shapes, const plTransform& rootTransform, float fDensity, const plJoltMaterial* pMaterial) override;
28
29
31 // plConvexShapeConvexComponent
32
33public:
36
37 virtual void ExtractGeometry(plMsgExtractGeometry& ref_msg) const override;
38
39 void SetMeshFile(const char* szFile); // [ property ]
40 const char* GetMeshFile() const; // [ property ]
41
42 plJoltMeshResourceHandle GetMesh() const { return m_hCollisionMesh; }
43
44protected:
45 plJoltMeshResourceHandle m_hCollisionMesh;
46};
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
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
Adds a Jolt convex hull shape to a Jolt actor.
Definition JoltShapeConvexHullComponent.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
Sent by plWorldGeoExtractionUtil to gather geometry information about objects in a world.
Definition WorldGeoExtractionUtil.h:56