Plasma Engine  2.0
Loading...
Searching...
No Matches
GrabbableItemComponent.h
1#pragma once
2
3#include <GameEngine/GameEngineDLL.h>
4
5#include <Core/World/World.h>
6
9
10struct PL_GAMEENGINE_DLL plGrabbableItemGrabPoint
11{
12 plVec3 m_vLocalPosition;
13 plQuat m_qLocalRotation;
14};
15
16PL_DECLARE_REFLECTABLE_TYPE(PL_GAMEENGINE_DLL, plGrabbableItemGrabPoint);
17
19
21
32class PL_GAMEENGINE_DLL plGrabbableItemComponent : public plComponent
33{
35
37 // plComponent
38
39public:
40 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
41 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
42
44 // plGrabbableItemComponent
45
46public:
49
50 void SetDebugShowPoints(bool bShow); // [ property ]
51 bool GetDebugShowPoints() const; // [ property ]
52
53 plDynamicArray<plGrabbableItemGrabPoint> m_GrabPoints; // [ property ]
54
55 static void DebugDrawGrabPoint(const plWorld& world, const plTransform& globalGrabPointTransform);
56
57protected:
58 void OnUpdateLocalBounds(plMsgUpdateLocalBounds& msg) const;
59 void OnExtractRenderData(plMsgExtractRenderData& msg) const;
60};
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
Definition DynamicArray.h:81
Used to define 'grab points' on an object where a player can pick up and hold the item.
Definition GrabbableItemComponent.h:33
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
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 GrabbableItemComponent.h:11
Definition RenderData.h:116
Definition UpdateLocalBoundsMessage.h:9