MQEngine
载入中...
搜索中...
未找到
SceneEntityViewer.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/8/25.
3//
4
5#ifndef SCENEENTITYVIEWER_H
6#define SCENEENTITYVIEWER_H
8
9namespace MQEngine {
10
12 public:
14 void renderGlobalEntityList(Scene* scene);
15 void renderTrunkEntityList(Scene* scene, std::string trunkName);
16 void renderSceneEntityList(Scene* scene);
17 void render();
18 void selectEntity(entt::entity entity, const std::string& trunkName = "", bool isGlobal = false);
19 private:
21
23 char m_newEntityName[256] = "entity";
24 std::string m_targetTrunkName;
25 bool m_createInGlobal = true;
26
27 bool m_showContextMenu = false;
29
31 void showCreateEntityDialog(const std::string& targetTrunk = "", bool isGlobal = true);
32 void createEntity(Scene* scene, const std::string& name, const std::string& trunkName = "", bool isGlobal = true);
33 void deleteEntity(entt::entity entity, const std::string& trunkName = "", bool isGlobal = false);
34 void addStaticMeshComponent(entt::entity entity, const std::string& modelUuid, const std::string& meshName, bool isGlobal, const std::string& trunkName = "");
35 void addScriptComponent(entt::entity entity, const std::string& functionName, bool isGlobal, const std::string& trunkName = "");
36 void addDiffuseTextureComponent(entt::entity entity, const std::string& modelUuid, const std::string& texturePath, bool isGlobal, const std::string& trunkName = "");
37 void addNormalTextureComponent(entt::entity entity, const std::string& modelUuid, const std::string& texturePath, bool isGlobal, const std::string& trunkName = "");
38
41 void openTextureTypePopup(entt::entity entity, const std::string& modelUuid, const std::string& texturePath, bool isGlobal, const std::string& trunkName);
42
45 entt::entity m_targetEntity;
47
50 std::string m_draggedModelUuid;
51 };
52
53} // MQEngine
54
55#endif //SCENEENTITYVIEWER_H
A header file containing third party libraries and macros for platform
定义 DataManager.h:58
void selectEntity(entt::entity entity, const std::string &trunkName="", bool isGlobal=false)
定义 SceneEntityViewer.cpp:171
void addNormalTextureComponent(entt::entity entity, const std::string &modelUuid, const std::string &texturePath, bool isGlobal, const std::string &trunkName="")
定义 SceneEntityViewer.cpp:358
char m_newEntityName[256]
定义 SceneEntityViewer.h:23
bool m_showScriptTypePopup
定义 SceneEntityViewer.h:43
void renderSceneEntityList(Scene *scene)
定义 SceneEntityViewer.cpp:31
void renderGlobalEntityList(Scene *scene)
定义 SceneEntityViewer.cpp:54
void openTextureTypePopup(entt::entity entity, const std::string &modelUuid, const std::string &texturePath, bool isGlobal, const std::string &trunkName)
定义 SceneEntityViewer.cpp:320
bool m_showContextMenu
定义 SceneEntityViewer.h:27
void renderCreateEntityDialog(Scene *scene)
定义 SceneEntityViewer.cpp:234
void addDiffuseTextureComponent(entt::entity entity, const std::string &modelUuid, const std::string &texturePath, bool isGlobal, const std::string &trunkName="")
定义 SceneEntityViewer.cpp:310
void render()
定义 SceneEntityViewer.cpp:15
bool m_createInGlobal
定义 SceneEntityViewer.h:25
bool m_targetIsGlobal
定义 SceneEntityViewer.h:46
bool m_showTextureTypePopup
定义 SceneEntityViewer.h:48
void createEntity(Scene *scene, const std::string &name, const std::string &trunkName="", bool isGlobal=true)
定义 SceneEntityViewer.cpp:258
void addScriptComponent(entt::entity entity, const std::string &functionName, bool isGlobal, const std::string &trunkName="")
定义 SceneEntityViewer.cpp:178
void showCreateEntityDialog(const std::string &targetTrunk="", bool isGlobal=true)
定义 SceneEntityViewer.cpp:227
DataManager * m_dataManager
定义 SceneEntityViewer.h:20
void deleteEntity(entt::entity entity, const std::string &trunkName="", bool isGlobal=false)
定义 SceneEntityViewer.cpp:275
void renderTrunkEntityList(Scene *scene, std::string trunkName)
定义 SceneEntityViewer.cpp:110
std::string m_targetTrunkName
定义 SceneEntityViewer.h:24
std::string m_draggedTexturePath
定义 SceneEntityViewer.h:49
void renderTextureTypeSelectionPopup()
定义 SceneEntityViewer.cpp:329
bool m_showCreateEntityDialog
定义 SceneEntityViewer.h:22
std::string m_draggedModelUuid
定义 SceneEntityViewer.h:50
entt::entity m_targetEntity
定义 SceneEntityViewer.h:45
void renderScriptTypeSelectionPopup()
定义 SceneEntityViewer.cpp:186
std::string m_contextMenuTarget
定义 SceneEntityViewer.h:28
SceneEntityViewer()
定义 SceneEntityViewer.cpp:11
void addStaticMeshComponent(entt::entity entity, const std::string &modelUuid, const std::string &meshName, bool isGlobal, const std::string &trunkName="")
定义 SceneEntityViewer.cpp:300
std::string m_draggedFunctionName
定义 SceneEntityViewer.h:44
定义 Scene.h:22
Entrypoint for the program.
定义 application.h:5