Plasma Engine  2.0
Loading...
Searching...
No Matches
MarkerComponent.h
1#pragma once
2
3#include <GameEngine/GameEngineDLL.h>
4
5#include <Core/World/Component.h>
6#include <Core/World/World.h>
7
9
20class PL_GAMEENGINE_DLL plMarkerComponent : public plComponent
21{
22 PL_DECLARE_COMPONENT_TYPE(plMarkerComponent, plComponent, plMarkerComponentManager);
23
25 // plComponent
26
27public:
28 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
29 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
30
31protected:
32 virtual void OnActivated() override;
33 virtual void OnDeactivated() override;
34
36 // plMarkerComponent
37
38public:
41
43 void SetMarkerType(const char* szType); // [ property ]
44 const char* GetMarkerType() const; // [ property ]
45
49 void SetRadius(float fRadius); // [ property ]
50 float GetRadius() const; // [ property ]
51
52protected:
53 void OnMsgUpdateLocalBounds(plMsgUpdateLocalBounds& msg) const; // [ msg handler ]
54 void UpdateMarker();
55
56 float m_fRadius = 0.1f; // [ property ]
57 plHashedString m_sMarkerType; // [ property ]
58
59 plSpatialData::Category m_SpatialCategory = plInvalidSpatialDataCategory;
60};
Base class of all component types.
Definition Component.h:25
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 OnDeactivated()
This method is called when the component gets deactivated.
Definition Component.cpp:142
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
virtual void OnActivated()
This method is called when the component gets activated.
Definition Component.cpp:140
Definition ComponentManager.h:88
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
This component is used to markup objects and locations with gameplay relevant semantical information.
Definition MarkerComponent.h:21
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
Definition SpatialData.h:27