From dc959637a8ec9804ea31944272ddc68f83d5bb95 Mon Sep 17 00:00:00 2001 From: kimnuri Date: Wed, 14 Jan 2026 21:33:05 +0900 Subject: [PATCH] [add] DebugCamera Editor [add] DEbugPlane EffectEditor --- .../Editor/Private/Camera_Debug.cpp | 28 ++++++++++++++++++- .../Editor/Private/Level_EffectViewer.cpp | 8 +++--- Jusin154_Team3D/Editor/Private/Level_Logo.cpp | 2 +- .../Engine/Private/PhysX_Manager.cpp | 4 +-- Jusin154_Team3D/Engine/Public/GameInstance.h | 2 +- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp index b34a27319..26e95ba16 100644 --- a/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp +++ b/Jusin154_Team3D/Editor/Private/Camera_Debug.cpp @@ -86,7 +86,7 @@ void CCamera_Debug::Priority_Update(_float fTimeDelta) void CCamera_Debug::Update(_float fTimeDelta) { - + Describe_Entity(); } void CCamera_Debug::Late_Update(_float fTimeDelta) @@ -176,4 +176,30 @@ void CCamera_Debug::Free() } void CCamera_Debug::Describe_Entity() { + _float3 vPosition = {}; + GUI::Begin("CAMERA"); + GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH); + if (m_pGameInstance->Key_Pressing(DIK_Y)) + { + if (m_pGameInstance->isPicking(&vPosition)) + { + GUI::InputFloat3("Pos", (float*)&vPosition); + } + } + GUI::End(); + GUI::Begin("CAMERA"); + _int iPriority = m_iPriority; + size_t iAddress = (size_t)this; + _string strHeader = "DEBUG_CAMERA_Priority##" + to_string(iAddress); + if (GUI::SliderInt(strHeader.c_str(), &iPriority, 45, 60)) { + m_iPriority = iPriority; + } + if (GUI::CollapsingHeader("DebugCamera")) { + m_pTransformCom->Describe_Entity(); + _float fFovYDegree = XMConvertToDegrees(m_fFovy); + if (GUI::SliderFloat("FOV", &fFovYDegree, 0.01f, 89.f, "%.2f")) { + m_fFovy = XMConvertToRadians(fFovYDegree); + } + } + GUI::End(); } diff --git a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp index e8b707312..28a06cd05 100644 --- a/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_EffectViewer.cpp @@ -99,11 +99,11 @@ HRESULT CLevel_EffectViewer::Initialize() } - //ZeroMemory(&m_PlaneData, sizeof(m_PlaneData)); - //m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC; - //m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); + ZeroMemory(&m_PlaneData, sizeof(m_PlaneData)); + m_PlaneData.eKind = PHYSX_KIND::BODY_STATIC; + m_PlaneData.iSubKind = ENUM_CLASS(PXOBJECT::TERRAIN); - //m_pGameInstance->Add_Editor_Plane(m_PlaneData); + m_pGameInstance->Add_Editor_Plane(m_PlaneData); /* 호그 스미드 */ diff --git a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp index 39ca11a98..4e8ee6d63 100644 --- a/Jusin154_Team3D/Editor/Private/Level_Logo.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_Logo.cpp @@ -60,7 +60,7 @@ void CLevel_Logo::Update(_float fTimeDelta) return; #endif // gimch #ifdef 기무리 - if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT)))) + if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::EFFECT)))) return; #endif // 기무리 #ifdef 진우 diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index 30eb1103d..b03e3934a 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -477,11 +477,11 @@ HRESULT CPhysX_Manager::SaveTriMeshes(const _char* pPath, vectoruserData = &PlaneData; pGroundPlane->setName("PHYSX_EDITPLANE"); m_pScene->addActor(*pGroundPlane); diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index f23d75036..5e92ee860 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -251,10 +251,10 @@ class ENGINE_DLL CGameInstance final : public CBase void ApplyFilterData(PSX::PxRigidActor* pRigidActor); HRESULT ConvertToTriMeshes(vector& Meshes, vector& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity()); #ifdef EDITOR_PROJECT + void Add_Editor_Plane(PHYSX_USERDATA& PlaneData); HRESULT SaveTriMeshes(const _char* pPath, vector& TriMeshes); #endif // EDITOR_PROJECT HRESULT LoadTriMeshes(const _char* pPath, vector& TriMeshes); // 모델 불러왔던 경로에 그대로 있음 - void Add_Editor_Plane(PHYSX_USERDATA& PlaneData); #pragma endregion #pragma region THREADHOLDER template