Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
DesignerSceneMetaInfo.h
Go to the documentation of this file.
1#pragma once
2
3#include <Common/Container/TStdUnorderedStringMap.h>
4
5#include <string>
6#include <string_view>
7
8namespace ph { class Path; }
9
10namespace ph::editor
11{
12
13class DesignerScene;
14
16{
17public:
19 {
20 std::string parentName = "";
21 bool isTicking = false;
22 bool isRenderTicking = false;
23
24 bool isRoot() const;
25 };
26
28
31 void gather(const DesignerScene& scene);
32
36 void load(const Path& directory, std::string_view infoName);
37
41 void save(const Path& directory, std::string_view infoName) const;
42
43 auto getObject(std::string_view objectName) const
44 -> const ObjectMetaInfo*;
45
46private:
47 using StringMapType = TStdUnorderedStringMap<ObjectMetaInfo>;
48
49 void setObjectMetaInfo(
50 std::string_view objectName,
51 ObjectMetaInfo objMeta,
52 bool expectNoOverwrite = true);
53
54 StringMapType m_objectNameToObjectMetaInfo;
55
56 // TODO: main camera
57};
58
60{
61 return parentName.empty();
62}
63
64}// end namespace ph::editor
Definition DesignerScene.h:58
Definition DesignerSceneMetaInfo.h:16
void gather(const DesignerScene &scene)
Gather meta information from scene.
Definition DesignerSceneMetaInfo.cpp:37
void load(const Path &directory, std::string_view infoName)
Load meta information from disk. Reads meta information file (.pdsm, Photon Designer Scene Meta-info)...
Definition DesignerSceneMetaInfo.cpp:54
void save(const Path &directory, std::string_view infoName) const
Save meta information to disk. Writes meta information file (.pdsm, Photon Designer Scene Meta-info).
Definition DesignerSceneMetaInfo.cpp:85
DesignerSceneMetaInfo()
Definition DesignerSceneMetaInfo.cpp:33
auto getObject(std::string_view objectName) const -> const ObjectMetaInfo *
Definition DesignerSceneMetaInfo.cpp:117
Definition ph_editor.h:10
Definition ph_editor.h:5
Definition DesignerSceneMetaInfo.h:19
std::string parentName
Definition DesignerSceneMetaInfo.h:20
bool isTicking
Definition DesignerSceneMetaInfo.h:21
bool isRenderTicking
Definition DesignerSceneMetaInfo.h:22
bool isRoot() const
Definition DesignerSceneMetaInfo.h:59