3#include <Core/ResourceManager/ResourceHandle.h>
4#include <Core/World/Component.h>
5#include <Core/World/World.h>
6#include <Foundation/Math/Vec2.h>
7#include <GameComponentsPlugin/GameComponentsDLL.h>
8#include <RendererCore/Components/RenderComponent.h>
9#include <RendererCore/Pipeline/RenderData.h>
52 virtual void SerializeComponent(
plWorldWriter& stream)
const override;
53 virtual void DeserializeComponent(
plWorldReader& stream)
override;
55 virtual void OnActivated()
override;
70 plVec2 GetHalfExtents()
const {
return m_vHalfExtents; }
71 void SetHalfExtents(
plVec2 value);
73 float GetHeight()
const {
return m_fHeight; }
74 void SetHeight(
float value);
76 plVec2 GetTexCoordOffset()
const {
return m_vTexCoordOffset; }
77 void SetTexCoordOffset(
plVec2 value);
79 plVec2 GetTexCoordScale()
const {
return m_vTexCoordScale; }
80 void SetTexCoordScale(
plVec2 value);
82 void SetMaterialFile(
const char* szFile);
83 const char* GetMaterialFile()
const;
88 void SetHeightfieldFile(
const char* szFile);
89 const char* GetHeightfieldFile()
const;
94 plVec2U32 GetTesselation()
const {
return m_vTesselation; }
97 void SetGenerateCollision(
bool b);
98 bool GetGenerateCollision()
const {
return m_bGenerateCollision; }
100 plVec2U32 GetColMeshTesselation()
const {
return m_vColMeshTesselation; }
101 void SetColMeshTesselation(
plVec2U32 value);
103 void SetIncludeInNavmesh(
bool b);
104 bool GetIncludeInNavmesh()
const {
return m_bIncludeInNavmesh; }
110 void InvalidateMesh();
114 template <
typename ResourceType>
117 plUInt32 m_uiHeightfieldChangeCounter = 0;
122 float m_fHeight = 50.0f;
130 bool m_bGenerateCollision =
true;
131 bool m_bIncludeInNavmesh =
true;
Definition ComponentManager.h:88
Provides functions to generate standard geometric shapes, such as boxes, spheres, cylinders,...
Definition Geometry.h:17
This component utilizes a greyscale image to generate an elevation mesh, which is typically used for ...
Definition HeightfieldComponent.h:46
Definition HeightfieldComponent.h:23
Definition MeshResourceDescriptor.h:9
Base class for objects that should be rendered.
Definition RenderComponent.h:9
static constexpr plVec2Template< float > MakeZero()
Definition Vec2.h:49
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
virtual void Initialize()
This method is called after the constructor. A derived type can override this method to do initializa...
Definition WorldModule.h:98
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 PhysicsWorldModule.h:263
Definition UpdateLocalBoundsMessage.h:9
These events may be sent by a specific plResource or by the plResourceManager.
Definition Declarations.h:22
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition WorldModule.h:33