From 7e6673a82f4b12b5357dec1f5ba19796bbc4c63f Mon Sep 17 00:00:00 2001
From: JinhoBa <127280695+JinhoBa@users.noreply.github.com>
Date: Fri, 14 Nov 2025 23:05:01 +0900
Subject: [PATCH] [change] MapObject Static -> Collision [fix]
BuildingContainer [add] MapFolderLoad [fix] Model header
---
.../Bin/Resources/Data/Map/ContainerTest.xml | 665 +++++++++++++++++-
.../Editor/Bin/Resources/Data/Map/Map1114.xml | 334 +++++++++
.../Resources/ShaderFiles/Shader_VtxMesh.hlsl | 32 +-
Jusin154_Team3D/Editor/Default/Editor.vcxproj | 4 +-
.../Editor/Default/Editor.vcxproj.filters | 10 +-
.../Editor/Private/BuildingContainer.cpp | 12 +
.../Editor/Private/Level_MapViewer.cpp | 6 +-
.../Editor/Private/Level_ObjectViewer.cpp | 2 +-
Jusin154_Team3D/Editor/Private/Loader.cpp | 137 ++--
.../Editor/Private/MapContainer.cpp | 58 +-
...ect_Static.cpp => MapObject_Collision.cpp} | 150 ++--
.../Editor/Private/MapObject_LOD.cpp | 3 +-
.../Editor/Private/MapObject_Manager.cpp | 287 +++++++-
Jusin154_Team3D/Editor/Private/Monster.cpp | 2 +-
.../Editor/Private/RootModelPart.cpp | 6 +-
.../Editor/Public/BuildingContainer.h | 21 +-
Jusin154_Team3D/Editor/Public/Loader.h | 5 +-
Jusin154_Team3D/Editor/Public/MapContainer.h | 6 +-
...pObject_Static.h => MapObject_Collision.h} | 27 +-
.../Editor/Public/MapObject_Manager.h | 8 +-
Jusin154_Team3D/Engine/Public/Model.h | 3 +-
21 files changed, 1595 insertions(+), 183 deletions(-)
create mode 100644 Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Map1114.xml
rename Jusin154_Team3D/Editor/Private/{MapObject_Static.cpp => MapObject_Collision.cpp} (52%)
rename Jusin154_Team3D/Editor/Public/{MapObject_Static.h => MapObject_Collision.h} (55%)
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
index 210855c23..be5a6a1a1 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/ContainerTest.xml
@@ -1,24 +1,663 @@
-
+
-
- Prototype_GameObject_SM_HW_GH_ArchSmall
- Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
- Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
-
-
-
-
-
- Prototype_GameObject_SM_HW_GH_ArchSmall
- Prototype_GameObject_SM_HW_GH_ArchSmall_Lod1
- Prototype_GameObject_SM_HW_GH_ArchSmall_Lod2
+
+ Prototype_GameObject_SM_HM_PlazaMain_A
+
+ Prototype_GameObject_SM_HM_PlazaMain_B
+
+
+
+
+
+ Prototype_GameObject_SM_HM_PlazaMain_C
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_AA_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_AA_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_BB_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_BB_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_CC_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_CC_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_DD_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_DD_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_EE_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_EE_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_FF_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_FF_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Plaza_HH_COL
+ Prototype_GameObject_SM_HM_Streets_Plaza_HH_COL_Lod1
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Hogshead
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_A
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_B
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stairwalls_3Broomsticks
+
+
+
+
+
+ Prototype_GameObject_SM_HM_LowerHiStreet_Zonkos
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_AA_COL
+ Prototype_GameObject_SM_HM_Streets_AA_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_BB_COL
+ Prototype_GameObject_SM_HM_Streets_BB_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_CC_COL
+ Prototype_GameObject_SM_HM_Streets_CC_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_DD_COL
+ Prototype_GameObject_SM_HM_Streets_DD_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_EE_COL
+ Prototype_GameObject_SM_HM_Streets_EE_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_FF_COL
+ Prototype_GameObject_SM_HM_Streets_FF_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_GG_COL
+ Prototype_GameObject_SM_HM_Streets_GG_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_HH_COL
+ Prototype_GameObject_SM_HM_Streets_HH_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL
+ Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL
+ Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL_Lod1
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_OutsideStairPlatform
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod1
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod2
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Blocker
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Steps_Base
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Steps_Base_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Windows
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Windows_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_window_glass
+ Prototype_GameObject_SM_HM_TScrolls_ext_window_glass_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Wood_Caps
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Wood_Caps_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_APL_COL
+ Prototype_GameObject_SM_HM_TScrolls_EXT_APL_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_A_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_B_PL_COL
+ Prototype_GameObject_SM_HM_TScrolls_EXT_B_PL_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_C_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_Platform_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Tscrolls_EXT_Stairs_COL
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_DoorFrame
+ Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod1
+ Prototype_GameObject_SM_HM_3Broom_DoorFrame_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_Door_L
+ Prototype_GameObject_SM_HM_3Broom_Door_L_Lod1
+ Prototype_GameObject_SM_HM_3Broom_Door_L_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_Door_R
+ Prototype_GameObject_SM_HM_3Broom_Door_R_Lod1
+ Prototype_GameObject_SM_HM_3Broom_Door_R_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim
+ Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod1
+ Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod2
+ Prototype_GameObject_SM_HM_3Broom_Ext_Awning_Trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod2
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign
+ Prototype_GameObject_SM_HM_3Broom_ext_barrels_sign_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands
+ Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_barrel_stands_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B
+ Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod2
+ Prototype_GameObject_SM_HM_3Broom_ext_chimneys_B_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_decals
+ Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_decals_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_Decals_A
+ Prototype_GameObject_SM_HM_3Broom_ext_Decals_A_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide
+ Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod1
+ Prototype_GameObject_SM_HM_3Broom_Ext_DoorFrameSide_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_Dormer_Wood_Slats
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_roof
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_copper_tops_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_decals
+ Prototype_GameObject_SM_HM_3Broom_ext_roof_decals_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box
+ Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_side_garden_box_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_trim
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod2
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_stone
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod2
+ Prototype_GameObject_SM_HM_3Broom_ext_trim_stone_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_walls
+ Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod1
+ Prototype_GameObject_SM_HM_3Broom_ext_walls_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels
+ Prototype_GameObject_SM_HM_3Broom_ext_wood_Corbels_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_Window_Glass
+ Prototype_GameObject_SM_HM_3Broom_Window_Glass_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod1
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod1
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod1
+ Prototype_GameObject_SM_HM_3Broom_RoundedWindow_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RectangurWindowPlain
+ Prototype_GameObject_SM_HM_3Broom_RectangurWindowPlain_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_Stone
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_Stone_Lod1
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_Stone_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_StoneB
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_StoneB_Lod1
+ Prototype_GameObject_SM_HM_3Broom_RectangularWindow_StoneB_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_CrossBeam
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_CrossBeam
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_EXT_APL_COL
+ Prototype_GameObject_SM_HM_3Broom_EXT_APL_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_EXT_B_PL_COL_2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_3Broom_EXT_PL_COL
+ Prototype_GameObject_SM_HM_3Broom_EXT_PL_COL_Lod1
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Map1114.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Map1114.xml
new file mode 100644
index 000000000..4f511827d
--- /dev/null
+++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Map/Map1114.xml
@@ -0,0 +1,334 @@
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_OutsideStairPlatform
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod1
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod2
+ Prototype_GameObject_SM_HM_OutsideStairPlatform_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_ext_entrance_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Blocker
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_ext_chimneys_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Front_Door_Surrounds_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Bay_Window_Display_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_ext_decals_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Roof_Trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Steps_Base
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Steps_Base_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod2
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Trim_Lod3
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Walls_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Windows
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Windows_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_ext_window_glass
+ Prototype_GameObject_SM_HM_TScrolls_ext_window_glass_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Wood_Caps
+ Prototype_GameObject_SM_HM_TScrolls_Ext_Wood_Caps_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Base_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor_Lod1
+ Prototype_GameObject_SM_HM_TScrolls_Sign_Anchor_Lod2
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_APL_COL
+ Prototype_GameObject_SM_HM_TScrolls_EXT_APL_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_A_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_B_PL_COL
+ Prototype_GameObject_SM_HM_TScrolls_EXT_B_PL_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_C_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_TScrolls_EXT_Platform_PL_COL
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Tscrolls_EXT_Stairs_COL
+
+
+
+
+
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_Hogshead
+
+
+
+
+
+ Prototype_GameObject_SM_HM_LowerHiStreet_Zonkos
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_A
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_B
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Stairwalls_3Broomsticks
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_AA_COL
+ Prototype_GameObject_SM_HM_Streets_AA_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_BB_COL
+ Prototype_GameObject_SM_HM_Streets_BB_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_CC_COL
+ Prototype_GameObject_SM_HM_Streets_CC_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_DD_COL
+ Prototype_GameObject_SM_HM_Streets_DD_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_EE_COL
+ Prototype_GameObject_SM_HM_Streets_EE_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_FF_COL
+ Prototype_GameObject_SM_HM_Streets_FF_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_GG_COL
+ Prototype_GameObject_SM_HM_Streets_GG_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_HH_COL
+ Prototype_GameObject_SM_HM_Streets_HH_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL
+ Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL
+ Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL_Lod1
+
+
+
+
+
+ Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL
+ Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL_Lod1
+
+
+
+
+
+
diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
index 816786437..4a503675a 100644
--- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
+++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_VtxMesh.hlsl
@@ -23,6 +23,7 @@ Texture2D g_MaskingTexture;
Texture2D g_ClippingTexture;
Texture2D g_DisolveTexture;
Texture2D g_NormalTexture;
+Texture2D g_GlowTexture;
struct VS_IN
{
@@ -176,7 +177,7 @@ PS_OUT PS_MAIN(PS_IN In)
Out.vDiffuse = vMtrlDiffuse;
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
- Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / 500.f, 0.0f, 1.f);
+ Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
return Out;
}
@@ -201,6 +202,25 @@ PS_OUT PS_MAIN_SELECT(PS_IN In)
return Out;
}
+PS_OUT PS_GLASS(PS_IN In)
+{
+ PS_OUT Out;
+
+ vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
+ vector vMtrlGlow = g_GlowTexture.Sample(DefaultSampler, In.vTexcoord);
+
+ vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
+ float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
+
+ float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
+
+ Out.vDiffuse = lerp(vMtrlDiffuse, vMtrlGlow, vMtrlDiffuse.a);
+ Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
+ Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
+
+ return Out;
+}
+
struct PS_IN_SHADOW
{
float4 vPosition : SV_POSITION;
@@ -449,4 +469,14 @@ technique11 MeshTechnique11
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MAIN_SELECT();
}
+
+ pass GlassPass // 12
+ {
+ SetRasterizerState(RS_Nocull);
+ SetDepthStencilState(DSS_Default, 0);
+ SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
+ VertexShader = compile vs_5_0 VS_MAIN();
+ GeometryShader = NULL;
+ PixelShader = compile ps_5_0 PS_GLASS();
+ }
}
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
index 4106b7beb..ba99dc222 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj
@@ -189,8 +189,8 @@
-
+
@@ -256,8 +256,8 @@
-
+
diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
index fe3b12355..d382b78cd 100644
--- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
+++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters
@@ -363,7 +363,7 @@
02.GameObjects\Env\02.MapObject
-
+
02.GameObjects\Env\02.MapObject\Static
@@ -378,9 +378,6 @@
02.GameObjects\Env\02.MapObject
-
- 02.GameObjects\Env\02.MapObject\Static
-
02.GameObjects\Env\02.MapObject\LOD
@@ -565,7 +562,7 @@
02.GameObjects\Env\02.MapObject
-
+
02.GameObjects\Env\02.MapObject\Static
@@ -580,9 +577,6 @@
02.GameObjects\Env\02.MapObject
-
- 02.GameObjects\Env\02.MapObject\Static
-
02.GameObjects\Env\02.MapObject\LOD
diff --git a/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp b/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
index 168bec286..4387692d0 100644
--- a/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
+++ b/Jusin154_Team3D/Editor/Private/BuildingContainer.cpp
@@ -20,12 +20,18 @@ void CBuildingContainer::Priority_Update(_float fTimeDelta)
{
__super::Priority_Update(fTimeDelta);
+ for (auto& pCollisiton : m_ColiisonPartObjects)
+ pCollisiton->Priority_Update(fTimeDelta);
+
m_bSelected = false;
}
void CBuildingContainer::Update(_float fTimeDelta)
{
__super::Update(fTimeDelta);
+
+ for (auto& pCollisiton : m_ColiisonPartObjects)
+ pCollisiton->Update(fTimeDelta);
}
void CBuildingContainer::Late_Update(_float fTimeDelta)
@@ -38,6 +44,9 @@ void CBuildingContainer::Late_Update(_float fTimeDelta)
}
__super::Late_Update(fTimeDelta);
+
+ for (auto& pCollisiton : m_ColiisonPartObjects)
+ pCollisiton->Late_Update(fTimeDelta);
}
HRESULT CBuildingContainer::Render()
@@ -118,6 +127,9 @@ CGameObject* CBuildingContainer::Clone(void* pArg, CGameObject* pOwner)
void CBuildingContainer::Free()
{
__super::Free();
+
+ for (auto& pCollision : m_ColiisonPartObjects)
+ SAFE_RELEASE(pCollision);
}
void CBuildingContainer::Describe_Entity()
diff --git a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
index bd84001a1..6c63d1a3d 100644
--- a/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_MapViewer.cpp
@@ -1,4 +1,4 @@
-#include "pch.h"
+#include "pch.h"
#include "Level_MapViewer.h"
#include "GameInstance.h"
@@ -23,7 +23,7 @@ void CLevel_MapViewer::Update(_float fTimeDelta)
HRESULT CLevel_MapViewer::Render()
{
- SetWindowText(g_hWnd, TEXT("MapEditor·¹º§ÀԴϴÙ"));
+ SetWindowText(g_hWnd, TEXT("MapEditor레벨입니다"));
GUI::ShowDemoWindow();
return S_OK;
}
@@ -73,6 +73,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
CameraDesc.fSpeedPerSec = 2.f;
+ CameraDesc.pCameraKey = TEXT("Debug_Camera");
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
CameraDesc.fMouseSensor = 0.1f;
@@ -80,6 +81,7 @@ HRESULT CLevel_MapViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
strLayerTag, &CameraDesc)))
return E_FAIL;
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
index 5a752e30b..bedaddf02 100644
--- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
+++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp
@@ -266,7 +266,7 @@ void CLevel_ObjectViewer::Show_AnimList()
{
pModel->Set_AnimationIndex(i);
pModel->Set_CurrentTrackPosition(0.f);
- pModel->Play_Animation(0.f);
+ //pModel->Play_Animation(0.f);
}
}
}
diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp
index 5f7d809fa..7288f2f42 100644
--- a/Jusin154_Team3D/Editor/Private/Loader.cpp
+++ b/Jusin154_Team3D/Editor/Private/Loader.cpp
@@ -52,7 +52,7 @@
#include "VIBuffer_Terrain.h"
#include "Terrain.h"
#include "BuildingContainer.h"
-#include "MapObject_Static.h"
+#include "MapObject_Collision.h"
#include "MapObject_LOD.h"
#include "MapObject_Manager.h"
#include "MapElement_Interactable.h"
@@ -650,7 +650,7 @@ HRESULT CLoader::Loading_For_PhysXLevel()
return E_FAIL;
}
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Static::Create(m_pDevice, m_pContext))))
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Collision::Create(m_pDevice, m_pContext))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_LOD::Create(m_pDevice, m_pContext))))
@@ -689,6 +689,60 @@ HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreN
return S_OK;
}
+HRESULT CLoader::MapFolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<_wstring>& ModelPrototypeTags, vector& ModelPrototypePath)
+{
+ for (const auto& file : filesystem::directory_iterator(pDirectoryPath))
+ {
+ if (file.is_directory())
+ continue;
+
+ string ext = file.path().extension().string();
+
+ if (strcmp(ext.c_str(), pFileExt)) {
+ continue;
+ }
+
+ _char szFilePath[MAX_PATH] = {};
+
+ strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
+
+ _wstring strFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
+
+ CModel* pModel = CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, szFilePath);
+
+ /*For Prototype_Component_Model_*/
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, strFileName, pModel)))
+ return E_FAIL;
+
+ if(bUseTag)
+ {
+ ModelPrototypeTags.push_back(strFileName);
+ ModelPrototypePath.emplace_back(file.path());
+ }
+
+ _uint iNumMesh = pModel->Get_NumMeshes();
+
+
+ CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{};
+ for (_uint i = 0; i < iNumMesh; ++i) {
+ _string strDestName = pModel->Get_MeshName(i) + to_string(i);
+ {
+ Desc.eType = ACTOR::TRIANGLEMESH;
+ Desc.ePxRigidBodyFlags = {};
+ Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
+ Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
+ Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
+ Desc.fContactOffset = 0.f;
+ }
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
+ return E_FAIL;
+ }
+ }
+ }
+
+ return S_OK;
+}
+
HRESULT CLoader::Loading_For_ObjectViewer()
@@ -863,6 +917,11 @@ HRESULT CLoader::Loading_For_MapViewer()
return E_FAIL;
}
+ if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("CollisionDebug"),
+ CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Effect/Noises/VFX_T_noise6_D.png"), 0)))) {
+ return E_FAIL;
+ }
+
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
/* For.Prototype_Component_SkyboxModel */
@@ -873,56 +932,28 @@ HRESULT CLoader::Loading_For_MapViewer()
vector<_wstring> ModelPrototypeTags = {};
vector ModelPrototypePath = {};
- //for (const auto& file : filesystem::directory_iterator("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes"))
- for (const auto& file : filesystem::directory_iterator("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogwarts\\SUB_GreatHall\\Static_Mesh\\Kit_INT"))
- //for (const auto& file : filesystem::directory_iterator("C:\\Users\\kimnuri\\Desktop\\Hogwart\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain"))
- {
- if (file.is_directory())
- continue;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
+ ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
+ ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions",
+ ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes",
+ ".fbx", false, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision",
+ ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes",
+ ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
+ if (FAILED(MapFolderLoad("C:\\Users\\82103\\Desktop\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit",
+ ".fbx", true, ModelPrototypeTags, ModelPrototypePath)))
+ return E_FAIL;
- string ext = file.path().extension().string();
-
- //if (strcmp(ext.c_str(), ".bin")){
- // continue;
- //}
- if (strcmp(ext.c_str(), ".fbx")){
- continue;
- }
-
- _char szFilePath[MAX_PATH] = {};
-
- strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str());
-
- _wstring strFileName = L"Prototype_GameObject_" + file.path().stem().wstring();
-
- CModel* pModel = CModel::Create(m_pDevice, m_pContext, MODEL::ENVIROMENT, szFilePath);
-
- /*For Prototype_Component_Model_*/
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, strFileName, pModel)))
- return E_FAIL;
-
- ModelPrototypeTags.push_back(strFileName);
- ModelPrototypePath.emplace_back(file.path());
-
- _uint iNumMesh = pModel->Get_NumMeshes();
-
-
- CRigidBody::RIGIDBODY_PROTOTYPEDESC Desc{};
- for (_uint i = 0; i < iNumMesh; ++i) {
- _string strDestName = pModel->Get_MeshName(i) + to_string(i);
- {
- Desc.eType = ACTOR::TRIANGLEMESH;
- Desc.ePxRigidBodyFlags = {};
- Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
- Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
- Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
- Desc.fContactOffset = 0.f;
- }
- if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, CMyTools::ToWstring(strDestName).c_str(), CRigidBody::Create(m_pDevice, m_pContext, Desc)))) {
- return E_FAIL;
- }
- }
- }
m_strMessage = TEXT("쉐이더를(을) 로딩 중 입니다.");
@@ -942,8 +973,8 @@ HRESULT CLoader::Loading_For_MapViewer()
if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CBuildingContainer::Create(m_pDevice, m_pContext))))
return E_FAIL;
- /* For.Prototype_GameObject_MapObject_Static */
- if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Static::Create(m_pDevice, m_pContext))))
+ /* For.Prototype_GameObject_MapObject_Collision */
+ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CMapObject_Collision::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_MapObject_LOD */
diff --git a/Jusin154_Team3D/Editor/Private/MapContainer.cpp b/Jusin154_Team3D/Editor/Private/MapContainer.cpp
index b4520a259..3c31bb688 100644
--- a/Jusin154_Team3D/Editor/Private/MapContainer.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapContainer.cpp
@@ -1,9 +1,8 @@
-#include "pch.h"
+#include "pch.h"
#include "MapContainer.h"
#include "PartObject.h"
#include "MapObject_LOD.h"
-#include "MapObject_Static.h"
CMapContainer::CMapContainer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CContainerObject(pDevice, pContext)
@@ -75,7 +74,7 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
{
- // ÅؽºƮ
+ // 텍스트
tinyxml2::XMLElement* proto = Doc.NewElement("PrototypeTag");
proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
PartObject->InsertEndChild(proto);
@@ -113,6 +112,59 @@ HRESULT CMapContainer::Save_PartObjects(tinyxml2::XMLDocument& Doc, tinyxml2::XM
PartObject->InsertEndChild(RotationElem);
}
+ for (auto& pObject : m_ColiisonPartObjects)
+ {
+ CMapObject* pMapObject = dynamic_cast(pObject);
+
+ if (nullptr == pMapObject)
+ return E_FAIL;
+
+ //
+ tinyxml2::XMLElement* Collision = Doc.NewElement("Collision");
+ Collision->SetAttribute("Lod_Level", pMapObject->Get_LodLevel());
+ Collision->SetAttribute("Key_Index", pMapObject->Get_iKeyIndex());
+ Container->InsertEndChild(Collision);
+
+ for (_uint i = 0; i < pMapObject->Get_LodLevel() + 1; ++i)
+ {
+ // 텍스트
+ tinyxml2::XMLElement* proto = Doc.NewElement("PrototypeTag");
+ proto->SetText(CMyTools::ToString(pMapObject->Get_PrototypeTag(i)).c_str());
+ Collision->InsertEndChild(proto);
+ }
+
+ //
+ tinyxml2::XMLElement* PositionElem = Doc.NewElement("Position");
+
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, pMapObject->Get_Component()->Get_State(STATE::POSITION));
+
+ PositionElem->SetAttribute("x", vPosition.x);
+ PositionElem->SetAttribute("y", vPosition.y);
+ PositionElem->SetAttribute("z", vPosition.z);
+ Collision->InsertEndChild(PositionElem);
+
+ //
+ tinyxml2::XMLElement* ScaleElem = Doc.NewElement("Scale");
+
+ _float3 pScale = pMapObject->Get_Component()->Get_Scale();
+ ScaleElem->SetAttribute("x", pScale.x);
+ ScaleElem->SetAttribute("y", pScale.y);
+ ScaleElem->SetAttribute("z", pScale.z);
+ Collision->InsertEndChild(ScaleElem);
+
+ //
+ tinyxml2::XMLElement* RotationElem = Doc.NewElement("Rotation");
+
+ _float3 vRotation = {};
+ XMStoreFloat3(&vRotation, pMapObject->Get_Component()->Get_RollPitchYawVector());
+
+ RotationElem->SetAttribute("x", vRotation.x);
+ RotationElem->SetAttribute("y", vRotation.y);
+ RotationElem->SetAttribute("z", vRotation.z);
+ Collision->InsertEndChild(RotationElem);
+ }
+
return S_OK;
}
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Static.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
similarity index 52%
rename from Jusin154_Team3D/Editor/Private/MapObject_Static.cpp
rename to Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
index 392f83091..71d7d579b 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Static.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Collision.cpp
@@ -1,5 +1,5 @@
#include "pch.h"
-#include "MapObject_Static.h"
+#include "MapObject_Collision.h"
#include "GameInstance.h"
#include "DebugCamera.h"
@@ -8,29 +8,29 @@
#include "VIBuffer_Terrain.h"
#include "MapObject_Manager.h"
-CMapObject_Static::CMapObject_Static(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CMapObject_Collision::CMapObject_Collision(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CMapObject(pDevice, pContext)
{
}
-CMapObject_Static::CMapObject_Static(const CMapObject_Static& Prototype)
+CMapObject_Collision::CMapObject_Collision(const CMapObject_Collision& Prototype)
: CMapObject(Prototype)
{
}
-void CMapObject_Static::Priority_Update(_float fTimeDelta)
+void CMapObject_Collision::Priority_Update(_float fTimeDelta)
{
#ifdef _DEBUG
m_bSelected = false;
#endif
}
-void CMapObject_Static::Update(_float fTimeDelta)
+void CMapObject_Collision::Update(_float fTimeDelta)
{
}
-void CMapObject_Static::Late_Update(_float fTimeDelta)
+void CMapObject_Collision::Late_Update(_float fTimeDelta)
{
#ifdef _DEBUG
if (m_bSelected)
@@ -41,30 +41,33 @@ void CMapObject_Static::Late_Update(_float fTimeDelta)
}
#endif
- XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
+ if(m_pGameInstance->Key_Pressing(DIK_Z))
+ {
+ XMStoreFloat4x4(&m_CombinedWorldMatrix, m_pTransformCom->Get_XMWorldMatrix() * m_pParentTransformCom->Get_XMWorldMatrix());
- _float4 vPos;
- XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
- m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, vPos, 20.f);
+ _float4 vPos;
+ XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
+ m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this, vPos, 20.f);
+ }
}
-HRESULT CMapObject_Static::Render()
+HRESULT CMapObject_Collision::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
- _uint iNumMeshes = m_pModelCom->Get_NumMeshes();
+ _uint iNumMeshes = m_pModelComs[m_iLodIndex]->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
- return E_FAIL;
- }
- if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
+ if (FAILED(m_pShaderCom->Bind_SRV("g_DiffuseTexture", m_pTextureCom->Get_SRV(0)))) {
return E_FAIL;
}
+ if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
+ return E_FAIL;
+ }
if (m_bSelected)
{
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_MESH::MAPTOOL)))) {
@@ -78,7 +81,7 @@ HRESULT CMapObject_Static::Render()
}
}
- if (FAILED(m_pModelCom->Render(i))) {
+ if (FAILED(m_pModelComs[m_iLodIndex]->Render(i))) {
return E_FAIL;
}
}
@@ -86,20 +89,24 @@ HRESULT CMapObject_Static::Render()
return S_OK;
}
-HRESULT CMapObject_Static::Initialize_Prototype()
+HRESULT CMapObject_Collision::Initialize_Prototype()
{
return S_OK;
}
-HRESULT CMapObject_Static::Initialize(void* pArg)
+HRESULT CMapObject_Collision::Initialize(void* pArg)
{
m_iMaxLodLevel = 0;
- MAPOBJECT_STATIC_DESC* pDesc = static_cast(pArg);
+ MAPOBJECT_LOD_DESC* pDesc = static_cast(pArg);
- m_strModelPrototypeTag = pDesc->strModelPrototypeTag;
- m_iModelPathIndex = pDesc->iModelPathIndex;
+ m_iMaxLodLevel = pDesc->iMaxLodLevel;
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; i++)
+ {
+ m_ModelPrototypeTags.push_back(pDesc->ModelPrototypeTags[i]);
+ //m_ModelPathIndices.push_back((*pDesc->pModelPathIndices)[i]);
+ }
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
@@ -121,29 +128,44 @@ HRESULT CMapObject_Static::Initialize(void* pArg)
return S_OK;
}
-_wstring CMapObject_Static::Get_PrototypeTag(_uint iLodIndex)
+_wstring CMapObject_Collision::Get_PrototypeTag(_uint iLodIndex)
{
- return m_strModelPrototypeTag;
+ if (m_iMaxLodLevel < iLodIndex)
+ return m_ModelPrototypeTags[0];
+
+ return m_ModelPrototypeTags[iLodIndex];
}
-HRESULT CMapObject_Static::Ready_Components()
+HRESULT CMapObject_Collision::Ready_Components()
{
__super::Ready_Components();
- /* Com_Model */
- if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_strModelPrototypeTag,
- reinterpret_cast(&m_pModelCom))))
- return E_FAIL;
+ for (_uint i = 0; i < m_iMaxLodLevel + 1; ++i)
+ {
+ CModel* pModel = { nullptr };
+
+ /* Com_Model */
+ if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, m_ModelPrototypeTags[i],
+ reinterpret_cast(&pModel))))
+ return E_FAIL;
+
+ m_pModelComs.push_back(pModel);
+ }
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_MESH,
reinterpret_cast(&m_pShaderCom))))
return E_FAIL;
+ /* Com_Texture */
+ if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("CollisionDebug"), reinterpret_cast(&m_pTextureCom), nullptr))) {
+ return E_FAIL;
+ }
+
return S_OK;
}
-HRESULT CMapObject_Static::Bind_ShaderResources()
+HRESULT CMapObject_Collision::Bind_ShaderResources()
{
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &m_CombinedWorldMatrix))) {
return E_FAIL;
@@ -162,9 +184,9 @@ HRESULT CMapObject_Static::Bind_ShaderResources()
return S_OK;
}
-CMapObject_Static* CMapObject_Static::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
+CMapObject_Collision* CMapObject_Collision::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
- CMapObject_Static* pInstance = new CMapObject_Static(pDevice, pContext);
+ CMapObject_Collision* pInstance = new CMapObject_Collision(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
@@ -175,28 +197,32 @@ CMapObject_Static* CMapObject_Static::Create(ID3D11Device* pDevice, ID3D11Device
return pInstance;
}
-CGameObject* CMapObject_Static::Clone(void* pArg, CGameObject* pOwner)
+CGameObject* CMapObject_Collision::Clone(void* pArg, CGameObject* pOwner)
{
- CMapObject_Static* pInstance = new CMapObject_Static(*this);
+ CMapObject_Collision* pInstance = new CMapObject_Collision(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
- MSG_BOX("Failed to Cloned : CMapObject_Static");
+ MSG_BOX("Failed to Cloned : CMapObject_Collision");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
-void CMapObject_Static::Free()
+void CMapObject_Collision::Free()
{
__super::Free();
SAFE_RELEASE(m_pShaderCom);
- SAFE_RELEASE(m_pModelCom);
+ SAFE_RELEASE(m_pTextureCom);
+
+ for (auto& pModel : m_pModelComs)
+ Safe_Release(pModel);
+ m_pModelComs.clear();
}
-void CMapObject_Static::Describe_Entity()
+void CMapObject_Collision::Describe_Entity()
{
if (m_bDead)
return;
@@ -204,6 +230,7 @@ void CMapObject_Static::Describe_Entity()
return;
//ImGui::Text(CMyTools::ToString(m_strModelPrototypeTag).c_str());
+ GUI::Checkbox("Visible", &m_bVisible);
ImGui::Text("----- Transfrom ----");
ImGui::InputFloat("X##Position", &m_vPosition.x, 0.1f, 1.f);
ImGui::InputFloat("Y##Position", &m_vPosition.y, 0.1f, 1.f);
@@ -216,7 +243,6 @@ void CMapObject_Static::Describe_Entity()
{
pTerrain->Get_Component()->Picking(pTerrain->Get_Component(), m_vPosition);
}
-
}
ImGui::Text("----- Rotation ----");
@@ -241,31 +267,31 @@ void CMapObject_Static::Describe_Entity()
GUI::OpenPopup("BakeStaticPhysXMesh##popup");
}
- if (GUI::BeginPopup("BakeStaticPhysXMesh##popup")) {
- if (GUI::Button("No")) {
- GUI::CloseCurrentPopup();
- }
- GUI::SameLine();
- if (GUI::Button("Bake!!!")) {
- CMapObject_Manager* pManager = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_MAPOBJECTMANAGER)->Get_Object();
+ //if (GUI::BeginPopup("BakeStaticPhysXMesh##popup")) {
+ // if (GUI::Button("No")) {
+ // GUI::CloseCurrentPopup();
+ // }
+ // GUI::SameLine();
+ // if (GUI::Button("Bake!!!")) {
+ // CMapObject_Manager* pManager = m_pGameInstance->Get_Layer(CURRENT_LEVEL, LAYER_MAPOBJECTMANAGER)->Get_Object();
- filesystem::path filePath = pManager->Get_PrototypePath(m_iModelPathIndex);
- m_pModelCom->Save_PhysXTriMeshes(CMyTools::ToString(pManager->Get_PrototypePath(m_iModelPathIndex)).c_str());
- _uint iNumMesh = m_pModelCom->Get_NumMeshes();
+ // filesystem::path filePath = pManager->Get_PrototypePath(m_iModelPathIndex);
+ // m_pModelCom->Save_PhysXTriMeshes(CMyTools::ToString(pManager->Get_PrototypePath(m_iModelPathIndex)).c_str());
+ // _uint iNumMesh = m_pModelCom->Get_NumMeshes();
- CRigidBody::RIGIDBODY_DESC Desc{};
- for (_uint i = 0; i < iNumMesh; ++i)
- { // RIGID_BODY
- Desc.szMeshName = _string(m_pModelCom->Get_MeshName(i) + to_string(i)).c_str();
+ // CRigidBody::RIGIDBODY_DESC Desc{};
+ // for (_uint i = 0; i < iNumMesh; ++i)
+ // { // RIGID_BODY
+ // Desc.szMeshName = _string(m_pModelCom->Get_MeshName(i) + to_string(i)).c_str();
- if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(Desc.szMeshName).c_str(), nullptr, &Desc))) {
- assert(false);
- }
- }
- GUI::CloseCurrentPopup();
- }
- GUI::EndPopup();
- }
+ // if (FAILED(Add_Asset_Component(g_iStaticLevel, CMyTools::ToWstring(Desc.szMeshName).c_str(), nullptr, &Desc))) {
+ // assert(false);
+ // }
+ // }
+ // GUI::CloseCurrentPopup();
+ // }
+ // GUI::EndPopup();
+ //}
m_bSelected = true;
-}
\ No newline at end of file
+}
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
index 1199726dd..a3ebfaaab 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_LOD.cpp
@@ -99,6 +99,7 @@ HRESULT CMapObject_LOD::Render()
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0))) {
return E_FAIL;
}
+
if (FAILED(m_pModelComs[0]->Bind_Material(i, m_pShaderCom, "g_NormalTexture", aiTextureType_NORMALS, 0))) {
return E_FAIL;
}
@@ -309,4 +310,4 @@ void CMapObject_LOD::Describe_Entity()
}
m_bSelected = true;
-}
\ No newline at end of file
+}
diff --git a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
index 8d50b328e..15d1742bb 100644
--- a/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
+++ b/Jusin154_Team3D/Editor/Private/MapObject_Manager.cpp
@@ -6,7 +6,7 @@
#include "Layer.h"
#include "MapObject.h"
#include "MapObject_LOD.h"
-#include "MapObject_Static.h"
+#include "MapObject_Collision.h"
#include "BuildingContainer.h"
#include "MapElement_Static.h"
#include "MapElement_Interactable.h"
@@ -67,6 +67,10 @@ void CMapObject_Manager::Priority_Update(_float fTimeDelta)
{
pObject->Priority_Update(fTimeDelta);
}
+ for (auto* pObject : m_Collision)
+ {
+ pObject->Priority_Update(fTimeDelta);
+ }
}
void CMapObject_Manager::Update(_float fTimeDelta)
@@ -79,7 +83,8 @@ void CMapObject_Manager::Update(_float fTimeDelta)
"ELEMENT_INTERACT"
};
GUI::Combo("MODE", (_int*)(&m_eType), ModeNames, IM_ARRAYSIZE(ModeNames));
-
+ GUI::Checkbox("Model View", &m_bModelVisable);
+ GUI::Checkbox("COL View", &m_bCollisionVisable);
GUI::InputText("MapFileName", m_szSaveFileName, MAX_PATH);
if (GUI::Button("Save_Map"))
{
@@ -111,10 +116,7 @@ void CMapObject_Manager::Update(_float fTimeDelta)
Update_ObjectList();
- if (ADD_TYPE::CONTAINER != m_eType)
- {
- Update_Edit();
- }
+ Update_Edit();
if (ADD_TYPE::CONTAINER == m_eType)
{
@@ -125,6 +127,10 @@ void CMapObject_Manager::Update(_float fTimeDelta)
{
pObject->Update(fTimeDelta);
}
+ for (auto* pObject : m_Collision)
+ {
+ pObject->Update(fTimeDelta);
+ }
}
void CMapObject_Manager::Late_Update(_float fTimeDelta)
@@ -139,11 +145,28 @@ void CMapObject_Manager::Late_Update(_float fTimeDelta)
}
else
{
- (*iter)->Late_Update(fTimeDelta);
+ if(m_bModelVisable)
+ (*iter)->Late_Update(fTimeDelta);
++iter;
}
}
+
+ auto Col_iter = m_Collision.begin();
+ for (; Col_iter != m_Collision.end();)
+ {
+ if ((*Col_iter)->isDead())
+ {
+ SAFE_RELEASE(*Col_iter);
+ Col_iter = m_Collision.erase(Col_iter);
+ }
+ else
+ {
+ if (m_bCollisionVisable)
+ (*Col_iter)->Late_Update(fTimeDelta);
+ ++Col_iter;
+ }
+ }
}
HRESULT CMapObject_Manager::Render()
@@ -388,7 +411,7 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _char* pContainerName)
{
- if (true == m_MapObjects.empty())
+ if (true == m_MapObjects.empty()&& true == m_Collision.empty())
return E_FAIL;
tinyxml2::XMLDocument doc;
@@ -498,7 +521,67 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
m_pSelectObject = nullptr;
#pragma endregion
- // ?ú?å
+#pragma region SAVE_COLLISION
+ for (auto& pColObject : m_Collision)
+ {
+ //
+ tinyxml2::XMLElement* Collision = doc.NewElement("Collision");
+ _uint iLodLvel = pColObject->Get_LodLevel();
+
+ Collision->SetAttribute("Lod_Level", iLodLvel);
+ Collision->SetAttribute("Key_Index", pColObject->Get_iKeyIndex());
+ container->InsertEndChild(Collision);
+
+ for (_uint i = 0; i < pColObject->Get_LodLevel() + 1; ++i)
+ {
+ // ÅØ½ºÆ®
+ tinyxml2::XMLElement* proto = doc.NewElement("PrototypeTag");
+ proto->SetText(CMyTools::ToString(pColObject->Get_PrototypeTag(i)).c_str());
+ Collision->InsertEndChild(proto);
+ }
+
+ //
+ tinyxml2::XMLElement* PositionElem = doc.NewElement("Position");
+
+ _float3 vPosition = {};
+ XMStoreFloat3(&vPosition, pColObject->Get_Component()->Get_State(STATE::POSITION));
+
+ PositionElem->SetAttribute("x", vPosition.x);
+ PositionElem->SetAttribute("y", vPosition.y);
+ PositionElem->SetAttribute("z", vPosition.z);
+ Collision->InsertEndChild(PositionElem);
+
+ //
+ tinyxml2::XMLElement* ScaleElem = doc.NewElement("Scale");
+
+ _float3 pScale = pColObject->Get_Component()->Get_Scale();
+ ScaleElem->SetAttribute("x", pScale.x);
+ ScaleElem->SetAttribute("y", pScale.y);
+ ScaleElem->SetAttribute("z", pScale.z);
+ Collision->InsertEndChild(ScaleElem);
+
+ //
+ tinyxml2::XMLElement* RotationElem = doc.NewElement("Rotation");
+
+ _float3 vRotation = {};
+ XMStoreFloat3(&vRotation, pColObject->Get_Component()->Get_RollPitchYawVector());
+
+ vRotation.x = XMConvertToDegrees(vRotation.x);
+ vRotation.y = XMConvertToDegrees(vRotation.y);
+ vRotation.z = XMConvertToDegrees(vRotation.z);
+
+ RotationElem->SetAttribute("x", vRotation.x);
+ RotationElem->SetAttribute("y", vRotation.y);
+ RotationElem->SetAttribute("z", vRotation.z);
+ Collision->InsertEndChild(RotationElem);
+
+ SAFE_RELEASE(pColObject);
+ }
+ m_Collision.clear();
+#pragma endregion
+
+
+ // ÀúÀå
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
MSG_BOX("Failed to Save File");
}
@@ -612,6 +695,51 @@ HRESULT CMapObject_Manager::Load_MapData(const _char* pFileName)
}
#pragma endregion
+
+#pragma region ADD_COLLISION
+ for (auto* Collision = Container->FirstChildElement("Collision"); Collision; Collision = Collision->NextSiblingElement("Collision"))
+ {
+ _uint iLodLevel = {};
+ _uint iKeyIndex = {};
+
+ Collision->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
+ Collision->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
+
+#pragma region MAPOBJECT_LOD
+ MAPOBJECT_LOD_DESC Desc = {};
+ string strTag = {};
+ for (auto* PrototypeTag = Collision->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
+ {
+ strTag = PrototypeTag->GetText();
+
+ Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
+ }
+ Desc.iMaxLodLevel = iLodLevel;
+ Desc.pParentTransform = pContainerObject->Get_Component();
+
+ /* Position */
+ tinyxml2::XMLElement* Position = Collision->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Scale */
+ tinyxml2::XMLElement* Scale = Collision->FirstChildElement("Scale");
+ Scale->QueryFloatAttribute("x", &Desc.vScale.x);
+ Scale->QueryFloatAttribute("y", &Desc.vScale.y);
+ Scale->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ /* Rotation */
+ tinyxml2::XMLElement* Rotation = Collision->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ pContainerObject->Add_Collision(g_iStaticLevel, &Desc);
+#pragma endregion
+
+ }
+#pragma endregion
}
for (auto* Object = root->FirstChildElement("Object"); Object; Object = Object->NextSiblingElement("Object"))
@@ -766,6 +894,52 @@ HRESULT CMapObject_Manager::Load_ContainerData(const _char* pFileName, const _ch
}
#pragma endregion
+#pragma region ADD_COLLISION
+ for (auto* Collision = TargetContainer->FirstChildElement("Collision"); Collision; Collision = Collision->NextSiblingElement("Collision"))
+ {
+ _uint iLodLevel = {};
+ _uint iKeyIndex = {};
+
+ Collision->QueryUnsignedAttribute("Lod_Level", &iLodLevel);
+ Collision->QueryUnsignedAttribute("Key_Index", &iKeyIndex);
+
+#pragma region MAPOBJECT_LOD
+ MAPOBJECT_LOD_DESC Desc = {};
+ string strTag = {};
+ for (auto* PrototypeTag = Collision->FirstChildElement("PrototypeTag"); PrototypeTag; PrototypeTag = PrototypeTag->NextSiblingElement("PrototypeTag"))
+ {
+ strTag = PrototypeTag->GetText();
+
+ Desc.ModelPrototypeTags.push_back(CMyTools::ToWstring(strTag));
+ }
+ Desc.iMaxLodLevel = iLodLevel;
+ Desc.pParentTransform = pContainerObject->Get_Component();
+
+ /* Position */
+ tinyxml2::XMLElement* Position = Collision->FirstChildElement("Position");
+ Position->QueryFloatAttribute("x", &Desc.vPosition.x);
+ Position->QueryFloatAttribute("y", &Desc.vPosition.y);
+ Position->QueryFloatAttribute("z", &Desc.vPosition.z);
+
+ /* Scale */
+ tinyxml2::XMLElement* Scale = Collision->FirstChildElement("Scale");
+ Scale->QueryFloatAttribute("x", &Desc.vScale.x);
+ Scale->QueryFloatAttribute("y", &Desc.vScale.y);
+ Scale->QueryFloatAttribute("z", &Desc.vScale.z);
+
+ /* Rotation */
+ tinyxml2::XMLElement* Rotation = Collision->FirstChildElement("Rotation");
+ Rotation->QueryFloatAttribute("x", &Desc.vRotation.x);
+ Rotation->QueryFloatAttribute("y", &Desc.vRotation.y);
+ Rotation->QueryFloatAttribute("z", &Desc.vRotation.z);
+
+ pContainerObject->Add_Collision(g_iStaticLevel, &Desc);
+#pragma endregion
+
+ }
+#pragma endregion
+
+
return S_OK;
}
#pragma endregion
@@ -780,7 +954,7 @@ void CMapObject_Manager::Update_PrototypeList()
{
auto& Tag = m_ModelPrototypeTags[i];
- if (_wstring::npos != Tag.find(L"Lod")) {
+ if (_wstring::npos != Tag.find(L"Lod") || _wstring::npos != Tag.find(L"COL")) {
continue;
}
@@ -807,6 +981,56 @@ void CMapObject_Manager::Update_PrototypeList()
}
GUI::End();
+ /* COL Mesh를 Container에 추가 */
+ if (ADD_TYPE::CONTAINER == m_eType)
+ {
+ GUI::Begin("Collision Model");
+ _uint iMaxSize = (_uint)m_ModelPrototypeTags.size();
+ for (_uint i = 0; i < iMaxSize; ++i)
+ {
+ auto& Tag = m_ModelPrototypeTags[i];
+
+ if (_wstring::npos != Tag.find(L"COL") && _wstring::npos == Tag.find(L"Lod")) {
+ if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
+ {
+ vector<_uint> LodModelIndices;
+
+ MAPOBJECT_LOD_DESC Desc = {};
+
+ vector<_wstring> PrototypeTags;
+
+ Find_Lod_Prototype(Tag, LodModelIndices);
+
+ PrototypeTags.push_back(Tag);
+
+ for (_uint i = 0; i < LodModelIndices.size(); ++i)
+ {
+ _wstring strLodTag = Tag + L"_Lod" + to_wstring(i + 1);
+ PrototypeTags.push_back(strLodTag);
+ }
+
+ Desc.iMaxLodLevel = (_uint)LodModelIndices.size() - 1;
+ Desc.ModelPrototypeTags = PrototypeTags;
+ Desc.pParentTransform = m_pTransformCom;
+ Desc.vPosition = _float3(0.f, 0.f, 0.f);
+ Desc.vRotation = _float3(0.f, 0.f, 0.f);
+ Desc.vScale = _float3(1.f, 1.f, 1.f);
+ Desc.pModelPathIndices = &LodModelIndices;
+
+ CMapObject_Collision* pMapObject = { nullptr };
+ const string strKey = CMyTools::ToString(Tag);
+
+ pMapObject = m_pGameInstance->Clone_Prototype(g_iStaticLevel, &Desc);
+
+ if(nullptr != pMapObject)
+ m_Collision.push_back(pMapObject);
+ }
+ }
+
+
+ }
+ GUI::End();
+ }
}
void CMapObject_Manager::Update_ObjectList()
@@ -820,11 +1044,34 @@ void CMapObject_Manager::Update_ObjectList()
_uint iObjectIndex = {};
string strSrc;
- if(ADD_TYPE::CONTAINER == m_eType)
+ if (ADD_TYPE::CONTAINER == m_eType)
{
- if (false == m_MapObjects.empty())
+ if (ImGui::CollapsingHeader("Map Objects", ImGuiTreeNodeFlags_DefaultOpen))
{
- for (auto pMapObject : m_MapObjects)
+ if (false == m_MapObjects.empty())
+ {
+ for (auto pMapObject : m_MapObjects)
+ {
+ CMapObject* pCurrentMapObject = static_cast(pMapObject);
+
+ if (nullptr == pCurrentMapObject)
+ continue;
+
+ wstring strPrototypeTag = pCurrentMapObject->Get_PrototypeTag();
+
+ strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
+
+ if (ImGui::Button(strSrc.c_str()))
+ {
+ m_pSelectObject = pCurrentMapObject;
+ }
+ }
+
+ }
+ }
+ if (ImGui::CollapsingHeader("COL", ImGuiTreeNodeFlags_DefaultOpen))
+ {
+ for (auto pMapObject : m_Collision)
{
CMapObject* pCurrentMapObject = static_cast(pMapObject);
@@ -1055,8 +1302,13 @@ _bool CMapObject_Manager::Find_Lod_Prototype(_wstring strPrototypeTag, vector<_u
// for (auto& Tag : m_LODModelPrototypeTags)
for(_uint i = 0 ; i < m_ModelPrototypeTags.size(); ++i)
{
- if (_wstring::npos != m_ModelPrototypeTags[i].find(strPrototypeTag) && 5 > (m_ModelPrototypeTags[i].size() - strPrototypeTag.size()))
+ if (m_ModelPrototypeTags[i] == strPrototypeTag)
LodModelIndices.push_back(i);
+
+ _wstring strPt = strPrototypeTag + L"_Lod";
+ if (_wstring::npos != m_ModelPrototypeTags[i].find(strPt)) //&& 5 > (m_ModelPrototypeTags[i].size() - strPrototypeTag.size()))
+ LodModelIndices.push_back(i);
+
}
if (0 < LodModelIndices.size()) {
return true;
@@ -1111,6 +1363,13 @@ void CMapObject_Manager::Free()
{
SAFE_RELEASE(pObject);
}
+ m_MapObjects.clear();
+
+ for (auto& pObject : m_Collision)
+ {
+ SAFE_RELEASE(pObject);
+ }
+ m_Collision.clear();
SAFE_RELEASE(m_pContainer);
}
diff --git a/Jusin154_Team3D/Editor/Private/Monster.cpp b/Jusin154_Team3D/Editor/Private/Monster.cpp
index 728a58183..ec5853c7e 100644
--- a/Jusin154_Team3D/Editor/Private/Monster.cpp
+++ b/Jusin154_Team3D/Editor/Private/Monster.cpp
@@ -44,7 +44,7 @@ void CMonster::Priority_Update(_float fTimeDelta)
void CMonster::Update(_float fTimeDelta)
{
- m_pModelCom->Play_Animation(fTimeDelta);
+ m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
}
void CMonster::Late_Update(_float fTimeDelta)
diff --git a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
index a3ef26530..e4e6ddd2d 100644
--- a/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
+++ b/Jusin154_Team3D/Editor/Private/RootModelPart.cpp
@@ -99,7 +99,7 @@ void CRootModelPart::Change_Model(_uint iIndex)
pModel->Set_AnimationIndex(m_iAnimIndex);
pModel->Set_CurrentTrackPosition(m_fTrackPosition);
- pModel->Play_Animation(0.f);
+ pModel->Play_Animation(0.f, m_pTransformCom);
if (iIndex == ENUM_CLASS(PARTSTYPE::BODY))
{
@@ -112,7 +112,7 @@ void CRootModelPart::Set_Animation(_uint iAnimIndex)
{
m_pMainModel->Set_AnimationIndex(iAnimIndex);
m_pMainModel->Set_CurrentTrackPosition(0.f);
- m_pMainModel->Play_Animation(0.f);
+ m_pMainModel->Play_Animation(0.f, m_pTransformCom);
for (auto& PartObject : m_ModelParts)
{
CModel* pModel = PartObject->Get_Component();
@@ -120,7 +120,7 @@ void CRootModelPart::Set_Animation(_uint iAnimIndex)
{
pModel->Set_AnimationIndex(m_pMainModel->Get_AnimIndex());
pModel->Set_CurrentTrackPosition(m_pMainModel->Get_CurrentTrackPosition());
- pModel->Play_Animation(0.f);
+ pModel->Play_Animation(0.f, m_pTransformCom);
}
}
}
diff --git a/Jusin154_Team3D/Editor/Public/BuildingContainer.h b/Jusin154_Team3D/Editor/Public/BuildingContainer.h
index bf4694f2d..bb90e6c14 100644
--- a/Jusin154_Team3D/Editor/Public/BuildingContainer.h
+++ b/Jusin154_Team3D/Editor/Public/BuildingContainer.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "MapContainer.h"
@@ -23,6 +23,23 @@ class CBuildingContainer final : public CMapContainer
HRESULT Add_Part(const _string& strPartKey, _uint iPrototypeLevelIndex, T** ppOut, void* pArg = nullptr) {
return Add_PartObject(strPartKey, iPrototypeLevelIndex, ppOut, pArg);
}
+ template
+ HRESULT Add_Collision(_uint iPrototypeLevelIndex, void* pArg = nullptr)
+ {
+ T* pPartObject = m_pGameInstance->Clone_Prototype(iPrototypeLevelIndex, pArg, this);
+
+ if (nullptr == pPartObject) {
+ return E_FAIL;
+ }
+
+ m_ColiisonPartObjects.push_back(pPartObject);
+
+ return S_OK;
+ }
+
+ vector* Get_Collision() { return &m_ColiisonPartObjects; }
+
+
private:
virtual HRESULT Initialize_Prototype() override;
@@ -37,4 +54,4 @@ class CBuildingContainer final : public CMapContainer
virtual void Describe_Entity()override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/Loader.h b/Jusin154_Team3D/Editor/Public/Loader.h
index 9546ada00..62caaffda 100644
--- a/Jusin154_Team3D/Editor/Public/Loader.h
+++ b/Jusin154_Team3D/Editor/Public/Loader.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "Base.h"
@@ -51,6 +51,7 @@ class CLoader final : public CBase
private:
HRESULT Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent);
+ HRESULT MapFolderLoad(const _char* pDirectoryPath, const _char* pFileExt, _bool bUseTag, vector<_wstring>& ModelPrototypeTags, vector& ModelPrototypePath);
public:
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);
@@ -58,4 +59,4 @@ class CLoader final : public CBase
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/MapContainer.h b/Jusin154_Team3D/Editor/Public/MapContainer.h
index 57095b7d3..461f146e2 100644
--- a/Jusin154_Team3D/Editor/Public/MapContainer.h
+++ b/Jusin154_Team3D/Editor/Public/MapContainer.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "ContainerObject.h"
@@ -43,8 +43,10 @@ class CMapContainer abstract : public CContainerObject
_float3 m_vRotation = {};
_float3 m_vScale = {};
+ vector m_ColiisonPartObjects;
+
public:
virtual void Free() override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Static.h b/Jusin154_Team3D/Editor/Public/MapObject_Collision.h
similarity index 55%
rename from Jusin154_Team3D/Editor/Public/MapObject_Static.h
rename to Jusin154_Team3D/Editor/Public/MapObject_Collision.h
index 067097ed5..759b026a0 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Static.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Collision.h
@@ -1,16 +1,20 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "MapObject.h"
+NS_BEGIN(Engine)
+class CTexture;
+NS_END
+
NS_BEGIN(Editor)
-class CMapObject_Static final : public CMapObject // LOD ¸ðµ¨ÀÌ ¾ø´Â ¾ֵé
+class CMapObject_Collision final : public CMapObject // LOD 모델이 없는 애들
{
private:
- CMapObject_Static(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
- CMapObject_Static(const CMapObject_Static& Prototype);
- virtual ~CMapObject_Static() = default;
+ CMapObject_Collision(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ CMapObject_Collision(const CMapObject_Collision& Prototype);
+ virtual ~CMapObject_Collision() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
@@ -23,10 +27,13 @@ class CMapObject_Static final : public CMapObject // LOD
private:
CShader* m_pShaderCom = { nullptr };
- CModel* m_pModelCom = { nullptr };
+ CTexture* m_pTextureCom = { nullptr };
+ vector m_pModelComs;
- _wstring m_strModelPrototypeTag;
- _uint m_iModelPathIndex = { UINT_MAX };
+ _uint m_iLodIndex = {};
+
+ vector<_wstring> m_ModelPrototypeTags;
+ vector<_uint> m_ModelPathIndices = { };
private:
virtual HRESULT Initialize_Prototype() override;
@@ -36,10 +43,10 @@ class CMapObject_Static final : public CMapObject // LOD
HRESULT Bind_ShaderResources();
public:
- static CMapObject_Static* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+ static CMapObject_Collision* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
virtual void Free() override;
virtual void Describe_Entity() override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
index 6d717337c..701a5f92d 100644
--- a/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
+++ b/Jusin154_Team3D/Editor/Public/MapObject_Manager.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
@@ -32,9 +32,13 @@ class CMapObject_Manager final : public CGameObject
private:
ADD_TYPE m_eType = {};
+ _bool m_bModelVisable = {true};
+ _bool m_bCollisionVisable = { true };
+
class CMapObject* m_pSelectObject = { nullptr };
class CMapElement* m_pSelectElemnt = { nullptr };
list m_MapObjects = {};
+ list m_Collision = {};
vector<_wstring> m_ModelPrototypeTags;
map<_wstring, _uint> m_PartObjectKeyCount;
vector<_wstring> m_LODModelPrototypeTags;
@@ -75,4 +79,4 @@ class CMapObject_Manager final : public CGameObject
virtual void Describe_Entity() override;
};
-NS_END
\ No newline at end of file
+NS_END
diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h
index 0398fb078..e495f8907 100644
--- a/Jusin154_Team3D/Engine/Public/Model.h
+++ b/Jusin154_Team3D/Engine/Public/Model.h
@@ -21,10 +21,11 @@ class ENGINE_DLL CModel final : public CComponent
#pragma endregion
#pragma region Animation
void Change_AnimationIndex(_int iAnimationIndex, _bool bIsLoop, _float fLerpDuration, _bool bIgnoreCurrentIndex = false); // 애니메이션을 다른 인덱스로 변경함
- _bool Play_Animation(_float fTimeDelta); // 애니메이션에 델타타임을 넣어줌
+ _bool Play_Animation(_float fTimeDelta, class CTransform* pTransform); // 애니메이션에 델타타임을 넣어줌
void RefreshAnim(); // 애님을 현재 애님의 초기상태로 되돌림
void Set_AnimationIndex(_uint iIndex, _bool isLoop = true);
void Stop_Animation(); // 애니메이션을 정지 (초기상태로)
+ void Set_Anim(CModel* Source);
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
_bool IsFinishedLerp() const { return m_bIsFinishedLerp; }
_float Get_AnimProgressRatio();