Plasma Engine  2.0
Loading...
Searching...
No Matches
WorldGeoExtractionUtil.h
1#pragma once
2
3#include <Core/ResourceManager/ResourceHandle.h>
4#include <Core/World/Declarations.h>
5#include <Foundation/Communication/Message.h>
6#include <Foundation/Containers/Deque.h>
7#include <Foundation/Types/TagSet.h>
8#include <RendererCore/RendererCoreDLL.h>
9
10class plWorld;
12
18class PL_RENDERERCORE_DLL plWorldGeoExtractionUtil
19{
20public:
22 {
23 plTransform m_GlobalTransform;
24 plCpuMeshResourceHandle m_hMeshResource;
25 };
26
28
30 enum class ExtractionMode
31 {
32 RenderMesh,
33 CollisionMesh,
34 NavMeshGeneration,
35 };
36
40 static void ExtractWorldGeometry(MeshObjectList& ref_objects, const plWorld& world, ExtractionMode mode, plTagSet* pExcludeTags = nullptr);
41
45 static void ExtractWorldGeometry(MeshObjectList& ref_objects, const plWorld& world, ExtractionMode mode, const plDeque<plGameObjectHandle>& selection);
46
48 static void WriteWorldGeometryToOBJ(const char* szFile, const MeshObjectList& objects, const plMat3& mTransform);
49};
50
55struct PL_RENDERERCORE_DLL plMsgExtractGeometry : public plMessage
56{
57 PL_DECLARE_MESSAGE_TYPE(plMsgExtractGeometry, plMessage);
58
61
64
65 void AddMeshObject(const plTransform& transform, plCpuMeshResourceHandle hMeshResource);
66 void AddBox(const plTransform& transform, plVec3 vExtents);
67};
Base class for all message types. Each message type has it's own id which is used to dispatch message...
Definition Message.h:22
A dynamic collection of tags featuring fast lookups.
Definition TagSet.h:23
A utility to gather raw geometry from a world.
Definition WorldGeoExtractionUtil.h:19
ExtractionMode
Describes what the geometry is needed for.
Definition WorldGeoExtractionUtil.h:31
@ RenderMesh
The render geometry is desired. Typically for exporting it to file.
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Sent by plWorldGeoExtractionUtil to gather geometry information about objects in a world.
Definition WorldGeoExtractionUtil.h:56
Definition WorldGeoExtractionUtil.h:22