• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision758 (tree)
Time2022-08-14 00:12:59
Authorhgtterry

Log Message

Equity_SB 130822 Imgui App Debug (WIP)

Change Summary

Incremental Difference

--- Anim19_OSDN/GD19_App.cpp (revision 757)
+++ Anim19_OSDN/GD19_App.cpp (revision 758)
@@ -81,6 +81,7 @@
8181 SBC_TopTabs = nullptr;
8282 SBC_MeshViewer = nullptr;
8383 SBC_Import_Room = nullptr;
84+ SBC_Debug = nullptr;
8485 // ---------------------------------------------------- 29/12/21
8586 Com_CDialogs = nullptr;
8687
@@ -236,7 +237,8 @@
236237 SBC_MeshViewer = new SB_MeshViewer();
237238 SBC_Import_Room = new SB_Import_Room();
238239 Com_CDialogs = new Com_Diaolgs();
239-
240+ SBC_Debug = new SB_Debug();
241+
240242 //-----------------------------------------------------
241243 SetBrushes_Fonts();
242244
--- Anim19_OSDN/GD19_App.h (revision 757)
+++ Anim19_OSDN/GD19_App.h (revision 758)
@@ -71,6 +71,7 @@
7171 #include "SB_Scene.h"
7272 #include "SB_TopTabs.h"
7373 #include "SB_MeshViewer.h"
74+#include "SB_Debug.h"
7475
7576 #include "Com_Diaolgs.h"
7677 #include "SB_Import_Room.h"
@@ -131,6 +132,7 @@
131132 SB_Scene* SBC_Scene; // Collection Class For Level [081221]
132133 SB_TopTabs* SBC_TopTabs; // Top Bar Tabs Class Level Editor [081221]
133134 SB_MeshViewer* SBC_MeshViewer;
135+ SB_Debug* SBC_Debug;
134136
135137 Com_Diaolgs* Com_CDialogs; // Common Dialogs for App [291221]
136138 SB_Import_Room* SBC_Import_Room;
--- Anim19_OSDN/GD19_OSDN.cpp (revision 757)
+++ Anim19_OSDN/GD19_OSDN.cpp (revision 758)
@@ -232,8 +232,34 @@
232232 return 1;
233233 }
234234
235- // ----------------------------------- Debug App
235+ // ----------------------------------- Debug
236236
237+ case ID_DEBUG_CAMERA:
238+ {
239+ if (App->SBC_Debug->Show_Debug_Camera == 1)
240+ {
241+ App->SBC_Debug->Show_Debug_Camera = 0;
242+ }
243+ else
244+ {
245+ App->SBC_Debug->Show_Debug_Camera = 1;
246+ }
247+ return 1;
248+ }
249+
250+ case ID_DEBUG_PROJECT:
251+ {
252+ if (App->SBC_Debug->Show_Debug_Project == 1)
253+ {
254+ App->SBC_Debug->Show_Debug_Project = 0;
255+ }
256+ else
257+ {
258+ App->SBC_Debug->Show_Debug_Project = 1;
259+ }
260+ return 1;
261+ }
262+
237263 case ID_DEBUG_APP32891:
238264 {
239265 if (App->CL_Vm_ImGui->Show_App_Data == 1)
--- Anim19_OSDN/GD19_OgreListener.cpp (revision 757)
+++ Anim19_OSDN/GD19_OgreListener.cpp (revision 758)
@@ -156,6 +156,11 @@
156156 App->CL_Vm_ImGui->Tabs_Render_Groups();
157157 }
158158
159+ if (App->SBC_Debug->Allow_Debug == 1)
160+ {
161+ App->SBC_Debug->Debug_Render_Loop();
162+ }
163+
159164 //ImGui::ShowDemoWindow();
160165
161166 }
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- Anim19_OSDN/SB_Debug.cpp (nonexistent)
+++ Anim19_OSDN/SB_Debug.cpp (revision 758)
@@ -0,0 +1,117 @@
1+/*
2+Copyright (c) 2021 Stage Builder and Equity -- Inflanite Software W.T.Flanigan H.C.Flanigan
3+
4+This software is provided 'as-is', without any express or implied
5+warranty. In no event will the authors be held liable for any damages
6+arising from the use of this software.
7+
8+Permission is granted to anyone to use this software for any purpose,
9+including commercial applications, and to alter it and redistribute it
10+freely, subject to the following restrictions:
11+
12+1. The origin of this software must not be misrepresented; you must not
13+claim that you wrote the original software. If you use this software
14+in a product, an acknowledgment in the product documentation would be
15+appreciated but is not required.
16+
17+2. Altered source versions must be plainly marked as such, and must not be
18+misrepresented as being the original software.
19+
20+3. This notice may not be removed or altered from any source
21+distribution.
22+*/
23+
24+#include "stdafx.h"
25+#include "GD19_App.h"
26+#include "SB_Debug.h"
27+
28+
29+
30+SB_Debug::SB_Debug()
31+{
32+ Allow_Debug = 1;
33+
34+ Show_Debug_Camera = 0;
35+ Show_Debug_Project = 0;
36+}
37+
38+SB_Debug::~SB_Debug()
39+{
40+}
41+
42+// *************************************************************************
43+// * Debug_Render_Loop Terry Flanigan *
44+// *************************************************************************
45+void SB_Debug::Debug_Render_Loop(void)
46+{
47+ if (Show_Debug_Camera == 1)
48+ {
49+ ImGui_Debug_Camera();
50+ }
51+
52+ if (Show_Debug_Project == 1)
53+ {
54+ ImGui_Debug_Project();
55+ }
56+}
57+
58+// *************************************************************************
59+// * ImGui_Debug_Camera Terry Flanigan *
60+// *************************************************************************
61+void SB_Debug::ImGui_Debug_Camera(void)
62+{
63+ ImGui::SetNextWindowPos(ImVec2(500, 30), ImGuiCond_FirstUseEver);
64+
65+ if (!ImGui::Begin("Camera_Debug", &Show_Debug_Camera, ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize))
66+ {
67+ ImGui::End();
68+ }
69+ else
70+ {
71+
72+ ImGui::Text("%s %f", "Pos_X = ", App->Cl19_Ogre->mCamera->getPosition().x);
73+ ImGui::Text("%s %f", "Pos_Y = ", App->Cl19_Ogre->mCamera->getPosition().y);
74+ ImGui::Text("%s %f", "Pos_Z = ", App->Cl19_Ogre->mCamera->getPosition().z);
75+
76+ ImGui::Text("%s %f", "Rot_X = ", App->Cl19_Ogre->mCamera->getOrientation().x);
77+ ImGui::Text("%s %f", "Rot_Y = ", App->Cl19_Ogre->mCamera->getOrientation().y);
78+ ImGui::Text("%s %f", "Rot_Z = ", App->Cl19_Ogre->mCamera->getOrientation().z);
79+
80+ ImGui::Spacing();
81+ ImGui::Spacing();
82+
83+ if (ImGui::Button("Close"))
84+ {
85+ Show_Debug_Camera = 0;
86+ }
87+
88+ ImGui::End();
89+ }
90+}
91+
92+// *************************************************************************
93+// * ImGui_Debug_Project Terry Bernie *
94+// *************************************************************************
95+void SB_Debug::ImGui_Debug_Project(void)
96+{
97+ ImGui::SetNextWindowPos(ImVec2(500, 30), ImGuiCond_FirstUseEver);
98+
99+ if (!ImGui::Begin("Project_Debug", &Show_Debug_Project, ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize))
100+ {
101+ ImGui::End();
102+ }
103+ else
104+ {
105+ ImGui::Text("Project Folder Location: = %s", App->SBC_Project->m_Project_Folder_Path);
106+
107+ ImGui::Spacing();
108+ ImGui::Spacing();
109+
110+ if (ImGui::Button("Close"))
111+ {
112+ Show_Debug_Project = 0;
113+ }
114+
115+ ImGui::End();
116+ }
117+}
--- Anim19_OSDN/SB_Debug.h (nonexistent)
+++ Anim19_OSDN/SB_Debug.h (revision 758)
@@ -0,0 +1,44 @@
1+/*
2+Copyright (c) 2021 Stage Builder and Equity -- Inflanite Software W.T.Flanigan H.C.Flanigan
3+
4+This software is provided 'as-is', without any express or implied
5+warranty. In no event will the authors be held liable for any damages
6+arising from the use of this software.
7+
8+Permission is granted to anyone to use this software for any purpose,
9+including commercial applications, and to alter it and redistribute it
10+freely, subject to the following restrictions:
11+
12+1. The origin of this software must not be misrepresented; you must not
13+claim that you wrote the original software. If you use this software
14+in a product, an acknowledgment in the product documentation would be
15+appreciated but is not required.
16+
17+2. Altered source versions must be plainly marked as such, and must not be
18+misrepresented as being the original software.
19+
20+3. This notice may not be removed or altered from any source
21+distribution.
22+*/
23+
24+#pragma once
25+class SB_Debug
26+{
27+public:
28+
29+ SB_Debug();
30+ ~SB_Debug();
31+
32+ void Debug_Render_Loop(void);
33+
34+ bool Allow_Debug;
35+
36+ bool Show_Debug_Camera;
37+ bool Show_Debug_Project;
38+
39+protected:
40+
41+ void ImGui_Debug_Camera(void);
42+ void ImGui_Debug_Project(void);
43+};
44+
--- Anim19_OSDN/VM_ImGui.cpp (revision 757)
+++ Anim19_OSDN/VM_ImGui.cpp (revision 758)
@@ -1102,6 +1102,10 @@
11021102 ImGui::Text("%s %f", "Pos_X = ", App->Cl19_Ogre->mCamera->getPosition().x);
11031103 ImGui::Text("%s %f", "Pos_Y = ", App->Cl19_Ogre->mCamera->getPosition().y);
11041104 ImGui::Text("%s %f", "Pos_Z = ", App->Cl19_Ogre->mCamera->getPosition().z);
1105+
1106+ ImGui::Text("%s %f", "Rot_X = ", App->Cl19_Ogre->mCamera->getOrientation().x);
1107+ ImGui::Text("%s %f", "Rot_Y = ", App->Cl19_Ogre->mCamera->getOrientation().y);
1108+ ImGui::Text("%s %f", "Rot_Z = ", App->Cl19_Ogre->mCamera->getOrientation().z);
11051109 }
11061110
11071111 ImGui::Spacing();
Show on old repository browser