Plasma Engine  2.0
Loading...
Searching...
No Matches
BakingScene.h
1#pragma once
2
3#include <BakingPlugin/Declarations.h>
4#include <Core/Graphics/AmbientCubeBasis.h>
5#include <Foundation/Configuration/Singleton.h>
6#include <Foundation/SimdMath/SimdTransform.h>
7#include <Foundation/Strings/HashedString.h>
8#include <Foundation/Types/UniquePtr.h>
9#include <RendererCore/BakedProbes/BakingInterface.h>
10#include <RendererCore/Utils/WorldGeoExtractionUtil.h>
11
12class plWorld;
13class plProgress;
15
16class PL_BAKINGPLUGIN_DLL plBakingScene
17{
18public:
19 plResult Extract();
20
21 plResult Bake(const plStringView& sOutputPath, plProgress& progress);
22
23 plResult RenderDebugView(const plMat4& InverseViewProjection, plUInt32 uiWidth, plUInt32 uiHeight, plDynamicArray<plColorGammaUB>& out_Pixels,
24 plProgress& progress) const;
25
26public:
27 const plWorldGeoExtractionUtil::MeshObjectList& GetMeshObjects() const { return m_MeshObjects; }
28 const plBoundingBox& GetBoundingBox() const { return m_BoundingBox; }
29
30 bool IsBaked() const { return m_bIsBaked; }
31
32private:
33 friend class plBaking;
34 friend class plMemoryUtils;
35
38
39 plBakingSettings m_Settings;
42 plBoundingBox m_BoundingBox;
43
44 plUInt32 m_uiWorldIndex = plInvalidIndex;
46
47 bool m_bIsBaked = false;
48};
49
50class PL_BAKINGPLUGIN_DLL plBaking : public plBakingInterface
51{
52 PL_DECLARE_SINGLETON_OF_INTERFACE(plBaking, plBakingInterface);
53
54public:
55 plBaking();
56
57 void Startup();
58 void Shutdown();
59
60 plBakingScene* GetOrCreateScene(const plWorld& world);
61 plBakingScene* GetScene(const plWorld& world);
62 const plBakingScene* GetScene(const plWorld& world) const;
63
64 // plBakingInterface
65 virtual plResult RenderDebugView(const plWorld& world, const plMat4& InverseViewProjection, plUInt32 uiWidth, plUInt32 uiHeight, plDynamicArray<plColorGammaUB>& out_Pixels, plProgress& progress) const override;
66};
Definition BakingScene.h:51
Definition BakingInterface.h:22
Definition BakingScene.h:17
Definition DynamicArray.h:81
This class provides functions to work on raw memory.
Definition MemoryUtils.h:26
Manages the way a progress bar is subdivided and advanced.
Definition Progress.h:36
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Definition TracerInterface.h:8
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
A world encapsulates a scene graph of game objects and various component managers and their component...
Definition World.h:22
Definition BakingInterface.h:8
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54