3#include <Core/Messages/EventMessage.h>
4#include <Core/Utils/IntervalScheduler.h>
5#include <Core/World/World.h>
6#include <GameEngine/GameEngineDLL.h>
34 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
35 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
38 virtual void OnActivated()
override;
39 virtual void OnDeactivated()
override;
49 virtual void DebugDrawSensorShape()
const = 0;
51 void SetSpatialCategory(
const char* szCategory);
52 const char* GetSpatialCategory()
const;
54 bool m_bTestVisibility =
true;
55 plUInt8 m_uiCollisionLayer = 0;
60 void SetShowDebugInfo(
bool bShow);
61 bool GetShowDebugInfo()
const;
88 void UpdateSpatialCategory();
89 void UpdateScheduling();
90 void UpdateDebugInfo();
93 bool m_bShowDebugInfo =
false;
102#if PL_ENABLED(PL_COMPILE_FOR_DEVELOPMENT)
119 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
120 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
126 virtual void DebugDrawSensorShape()
const override;
135 float m_fRadius = 10.0f;
150 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
151 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
157 virtual void DebugDrawSensorShape()
const override;
166 float m_fRadius = 10.0f;
167 float m_fHeight = 10.0f;
182 virtual void SerializeComponent(
plWorldWriter& inout_stream)
const override;
183 virtual void DeserializeComponent(
plWorldReader& inout_stream)
override;
189 virtual void DebugDrawSensorShape()
const override;
198 float m_fNearDistance = 0.0f;
199 float m_fFarDistance = 10.0f;
207 PL_DECLARE_WORLD_MODULE();
215 void AddComponentToSchedule(
plSensorComponent* pComponent, plUpdateRate::Enum updateRate);
Float wrapper struct for a safe usage and conversions of angles.
Definition Angle.h:10
static constexpr plAngle MakeFromDegree(float fDegree)
Creates an instance of plAngle that was initialized from degree. (Performs a conversion)
Definition Angle_inl.h:33
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
static PL_ALWAYS_INLINE plColor LightUI(Enum schemeColor)
Get a scheme color with predefined brightness and saturation to look good as highlight color in PL to...
Definition ColorScheme.h:66
Base class of all component types.
Definition Component.h:25
Definition ComponentManager.h:88
Definition DynamicArray.h:81
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
Definition IntervalScheduler.h:65
Definition PhysicsWorldModule.h:109
Base class for sensor components that can be used for AI perception like vision or hearing.
Definition SensorComponent.h:27
plArrayPtr< const plGameObjectHandle > GetLastDetectedObjects() const
Returns the list of objects that this sensor has detected during its last update.
Definition SensorComponent.h:70
Definition SensorComponent.h:175
Definition SensorComponent.h:143
Definition SensorComponent.h:112
Definition SensorComponent.h:206
virtual void Initialize() override
This method is called after the constructor. A derived type can override this method to do initializa...
Definition SensorComponent.cpp:616
A dynamic collection of tags featuring fast lookups.
Definition TagSet.h:23
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition WorldModule.h:10
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
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Base class for all messages that are sent as 'events'.
Definition EventMessage.h:8
Definition SensorComponent.h:11
Definition SpatialData.h:27
Definition WorldModule.h:33