[add] Terrain 스플래팅 적용
This commit is contained in:
@@ -3608,4 +3608,158 @@
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
<Container Name="Street_Main">
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_Hogshead</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_A</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_B</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="1" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Stairwalls_3Broomsticks</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<PartObject Lod_Level="0" Key_Index="0" Render_Type="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_LowerHiStreet_Zonkos</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</PartObject>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_AA_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_AA_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_BB_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_BB_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_CC_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_CC_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_DD_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_DD_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_EE_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_EE_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_FF_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_FF_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_GG_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_GG_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_HH_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_HH_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_A_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_B_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_C_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HM_Streets_SideStreet_D_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_E_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
<Collision Lod_Level="1" Key_Index="0">
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL</PrototypeTag>
|
||||
<PrototypeTag>Prototype_GameObject_SM_HW_Streets_SideStreet_F_COL_Lod1</PrototypeTag>
|
||||
<Position x="0" y="0" z="0"/>
|
||||
<Scale x="1" y="1" z="1"/>
|
||||
<Rotation x="0" y="0" z="0"/>
|
||||
</Collision>
|
||||
</Container>
|
||||
</Land>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -4,8 +4,15 @@
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
float g_fFar;
|
||||
float g_fUsingSurfaceParams;
|
||||
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_SurfaceParamsTexture;
|
||||
Texture2D g_DiffuseTextures[2];
|
||||
Texture2D g_NormalTextures[2];
|
||||
Texture2D g_SurfaceParamsTextures[2];
|
||||
Texture2D g_MaskTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -51,24 +58,53 @@ struct PS_IN
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vDepth : SV_TARGET2;
|
||||
float4 vColor : SV_Target3;
|
||||
float4 vSurface : SV_Target4;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float2 tileUV = In.vWorldPos.xz / 64.f;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord * 30.f);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
vector vMask = g_MaskTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vMtrlDiffuse_0 = g_DiffuseTextures[0].Sample(DefaultSampler, tileUV);
|
||||
vector vMtrlDiffuse_1 = g_DiffuseTextures[1].Sample(DefaultSampler, tileUV);
|
||||
|
||||
vector vMtrlDiffuse = lerp(vMtrlDiffuse_0, vMtrlDiffuse_1, vMask.r);
|
||||
|
||||
vector vSurface_0 = g_SurfaceParamsTextures[0].Sample(DefaultSampler, tileUV);
|
||||
vector vSurface_1 = g_SurfaceParamsTextures[1].Sample(DefaultSampler, tileUV);
|
||||
|
||||
vector vSurface = lerp(vSurface_0, vSurface_1, vMask.r);
|
||||
|
||||
float3 vNormalDecoded_0 = DecodeNormalFromRG(g_NormalTextures[0], DefaultSampler, tileUV);
|
||||
float3 vNormalDecoded_1 = DecodeNormalFromRG(g_NormalTextures[0], DefaultSampler, tileUV);
|
||||
|
||||
float3 vNormalDecoded = normalize(lerp(vNormalDecoded_0, vNormalDecoded_1, vMask.r));
|
||||
|
||||
float3 vBinormal = cross(In.vNormal.xyz, float3(1.f, 0.f, 0.f));
|
||||
|
||||
float3 vTangent = cross(vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3x3 WorldMatrix = float3x3(vTangent, vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
g_fUsingSurfaceParams, // 서페이스 파라미터
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = vSurface;
|
||||
|
||||
Out.vNormal = float4(In.vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.0f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -148,10 +148,10 @@ void CBuildingContainer::Describe_Entity()
|
||||
if (m_pGameInstance->Mouse_Down(DIM_LBUTTON) && m_pGameInstance->Key_Pressing(DIK_LSHIFT))
|
||||
{
|
||||
CTerrain* pTerrain = m_pGameInstance->Get_Layer(ENUM_CLASS(LEVEL::MAP), TEXT("Layer_Terrain"))->Get_Object<CTerrain>();
|
||||
/*if (nullptr != pTerrain)
|
||||
if (nullptr != pTerrain)
|
||||
{
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>(), m_vPosition);
|
||||
}*/
|
||||
pTerrain->Get_Component<CVIBuffer_Terrain>()->Picking(pTerrain->Get_Component<CTransform>()->Get_XMWorldMatrix(), &m_vPosition);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Text("----- Rotation ----");
|
||||
|
||||
@@ -40,7 +40,14 @@ void CDummySkyBox::Priority_Update(_float fTimeDelta)
|
||||
|
||||
void CDummySkyBox::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef gimch
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object<CDebugCamera>()->Get_WorldPostion());
|
||||
|
||||
#else
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_pGameInstance->Get_Layer(NEXT_LEVEL, LAYER_CAMERA)->Get_Object<CCamera_Gaze>()->Get_WorldPostion());
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
}
|
||||
|
||||
void CDummySkyBox::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -1172,11 +1172,8 @@ void APIENTRY Deferred_FolderLoad_Main(ID3D11Device* pDevice, ID3D11DeviceContex
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
|
||||
{
|
||||
if (true == bUseTag)
|
||||
{
|
||||
pContents->pModelTag = wstrFileName;
|
||||
pContents->pathModel = file.path();
|
||||
}
|
||||
pContents->pModelTag = wstrFileName;
|
||||
pContents->pathModel = file.path();
|
||||
|
||||
pContents->pLoadedModel = pModel;
|
||||
|
||||
@@ -1418,7 +1415,33 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("TerrainTest"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/T_LandscapeStreamingProxy_0_LOD1_Summer_D.png"), 0)))) {
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures//T_LandscapeStreamingProxy_0_LOD1_Summer_D.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Terrain_Mask */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Mask"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Data/Map/T_OL_GrassBlend_Mask_D.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Diffuse */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Diffuse"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_D_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Normal */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Normal"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_N_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_MRO */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_MRO"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_MRO_%d.dds"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -1443,13 +1466,13 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
vector<filesystem::path> ModelPrototypePath = {};
|
||||
|
||||
#pragma region HOGSMEADE
|
||||
|
||||
//
|
||||
///* Terrain*/
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
//if (FAILED(MapFolderLoad("C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
// ".bin", false, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// ".bin", true, ModelPrototypeTags, ModelPrototypePath)))
|
||||
// return E_FAIL;
|
||||
|
||||
///* TScrolls*/
|
||||
@@ -1630,317 +1653,317 @@ HRESULT CLoader::Loading_For_MapViewer()
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#ifdef 기무리
|
||||
#ifdef gimch
|
||||
|
||||
vector<future<void>> jobFutures;
|
||||
|
||||
_uint iLoadCount = 46;
|
||||
vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
|
||||
{
|
||||
{ /* Terrain */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* TScrolls */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* 3BroomStick*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Ollivanders*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Gatehouse*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_QuidditchShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_HogsheadInn */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Honeydukes */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_OwlPost */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_TeaShop */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Zonkos */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_DB_GR */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Potions */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* BLDG_Salon */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* Hengist_Tree */
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN A*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN B*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN C*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN E*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN F*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN G*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN H*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
{ /* GEN J*/
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
"C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision",
|
||||
".bin", false,
|
||||
&Contents[jobFutures.size()]
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& jobFuture : jobFutures)
|
||||
{
|
||||
jobFuture.get();
|
||||
}
|
||||
|
||||
for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
FOLDER_LOAD* pContents = (*Contents[i])[j];
|
||||
if (true == pContents->bLoadTags) {
|
||||
ModelPrototypeTags.push_back(pContents->pModelTag);
|
||||
ModelPrototypePath.push_back(pContents->pathModel);
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) {
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//vector<future<void>> jobFutures;
|
||||
//
|
||||
//_uint iLoadCount = 46;
|
||||
//vector<vector<FOLDER_LOAD*>*> Contents(iLoadCount);
|
||||
//
|
||||
//{
|
||||
// { /* Terrain */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Terrain",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* TScrolls */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TScrolls\\Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* 3BroomStick*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_ThreeBroomsticks\\Meshes\\3Broom_Kit",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Ollivanders*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Ollivanders\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Gatehouse*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Gatehouse\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_QuidditchShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_QuidditchShop\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_HogsheadInn */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_HogsheadInn\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Honeydukes */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Honeydukes\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_OwlPost */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_OwlPost\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_TeaShop */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_TeaShop\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Zonkos */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Zonkos\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_DB_GR */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_DB_GR\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Potions */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Potions\\Collisions",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* BLDG_Salon */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_Salon\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* Hengist_Tree */
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Meshes\\Vegetation\\Hengist_Tree",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\Common\\Collision\\Vegetation",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN A*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_A\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN B*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_B\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN C*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_C\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN E*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_E\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN F*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_F\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN G*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_G\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN H*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_H\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
// { /* GEN J*/
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Meshes",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// jobFutures.emplace_back(Deferred_FolderLoad(
|
||||
// "C:\\MeshTable\\Game\\Environment\\Hogsmeade\\BLDG_GEN_J\\Collision",
|
||||
// ".bin", false,
|
||||
// &Contents[jobFutures.size()]
|
||||
// ));
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//for (auto& jobFuture : jobFutures)
|
||||
//{
|
||||
// jobFuture.get();
|
||||
//}
|
||||
//
|
||||
//for (_uint i = 0; i < Contents.size(); ++i) {
|
||||
// for (_uint j = 0; j < (Contents[i])->size(); ++j) {
|
||||
// FOLDER_LOAD* pContents = (*Contents[i])[j];
|
||||
// if (true == pContents->bLoadTags) {
|
||||
// ModelPrototypeTags.push_back(pContents->pModelTag);
|
||||
// ModelPrototypePath.push_back(pContents->pathModel);
|
||||
// }
|
||||
//
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pModelTag, pContents->pLoadedModel))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//
|
||||
// for (_uint k = 0; k < pContents->pRigidBodyTags.size(); ++k) {
|
||||
// if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pContents->pRigidBodyTags[k], pContents->LoadedRigidBody[k]))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
#endif // 기무리
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ CMapObject_Manager::CMapObject_Manager(const CMapObject_Manager& rhs)
|
||||
|
||||
HRESULT CMapObject_Manager::Initialize_Prototype(vector<_wstring>& ModelPrototypeTags, vector<filesystem::path>& ModelPrototypePaths)
|
||||
{
|
||||
//for (auto& Tag : ModelPrototypeTags)
|
||||
for (_uint i = 0 ; i < ModelPrototypeTags.size(); ++i)
|
||||
/*for (_uint i = 0 ; i < ModelPrototypeTags.size(); ++i)
|
||||
{
|
||||
if (_wstring::npos != ModelPrototypeTags[i].find(L"Lod"))
|
||||
{
|
||||
@@ -42,7 +41,7 @@ HRESULT CMapObject_Manager::Initialize_Prototype(vector<_wstring>& ModelPrototyp
|
||||
|
||||
m_ModelPrototypeTags.push_back(ModelPrototypeTags[i]);
|
||||
m_ModelPrototypePaths.push_back(ModelPrototypePaths[i]);
|
||||
}
|
||||
}*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,11 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_fUsingSurfaceParams = 15.f / 27.f;
|
||||
m_vRotation = _float3{ 0.f, 0.f, 0.f };
|
||||
//m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-128.f, -100.f, -128.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-194, 18.5f, -153.f, 1.f));
|
||||
|
||||
//m_pVIBufferCom->Set_CullingRadius(0.04f);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -37,34 +40,39 @@ HRESULT CTerrain::Initialize(void* pArg)
|
||||
void CTerrain::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
GUI::Begin("Picking Position");
|
||||
if (m_pGameInstance->Mouse_Pressing(0))
|
||||
if (m_pGameInstance->Mouse_Pressing(DIM_LBUTTON))
|
||||
{
|
||||
if (m_pGameInstance->isPicking(&m_vPickingPosition))
|
||||
if (m_pVIBufferCom->Picking(m_pTransformCom->Get_XMWorldMatrix(), &m_vPickingPosition))
|
||||
{
|
||||
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), m_vPickingPosition.y);
|
||||
if(m_pGameInstance->Key_Pressing(DIK_PERIOD))
|
||||
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), 0.01f);
|
||||
if(m_pGameInstance->Key_Pressing(DIK_COMMA))
|
||||
m_pVIBufferCom->FitY(m_pTransformCom->Get_XMWorldMatrix(), -0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
GUI::InputFloat("Height Ratio", &m_fHeightRatio);
|
||||
/*GUI::InputFloat("Height Ratio", &m_fHeightRatio);
|
||||
max(0.01f, m_fHeightRatio);
|
||||
|
||||
*/
|
||||
//m_pVIBufferCom->Change_HeigthRatio(m_fHeightRatio);
|
||||
GUI::DragFloat3("Picking", (_float*)(&m_vPickingPosition));
|
||||
//GUI::DragFloat3("Picking", (_float*)(&m_vPickingPosition));
|
||||
_float4 vPos = {};
|
||||
_float3 vRotation = {};
|
||||
XMStoreFloat4(&vPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
GUI::DragFloat3("Pos", (_float*)(&vPos));
|
||||
GUI::DragFloat3("Rota", (_float*)(&m_vRotation));
|
||||
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
//m_pTransformCom->Rotation(XMConvertToRadians(m_vRotation.x), XMConvertToRadians(m_vRotation.y), XMConvertToRadians(m_vRotation.z));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat4(&vPos));
|
||||
|
||||
GUI::DragFloat("Culling Radius", &m_fCullingRadius, 0.01f, 0.01f, 2.f);
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
void CTerrain::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pVIBufferCom->Culling(XMMatrixIdentity());
|
||||
//m_pVIBufferCom->Culling(XMMatrixIdentity());
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +119,20 @@ HRESULT CTerrain::Ready_Components()
|
||||
return E_FAIL;
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("TerrainTest"), reinterpret_cast<CComponent**>(&m_pTextureCom), nullptr))) {
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Terrain_Diffuse"), reinterpret_cast<CComponent**>(&m_pDiffuseTextureCom), nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Com_Texture */
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Terrain_Normal"), reinterpret_cast<CComponent**>(&m_pNormalTextureCom), nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Com_Texture */
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Terrain_MRO"), reinterpret_cast<CComponent**>(&m_pMROTextureCom), nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Com_Texture */
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Terrain_Mask"), reinterpret_cast<CComponent**>(&m_pMaskTextureCom), nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -134,9 +155,21 @@ HRESULT CTerrain::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_DiffuseTexture", m_pTextureCom->Get_SRV(0)))) {
|
||||
if (FAILED(m_pDiffuseTextureCom->Bind_ShaderResources(m_pShaderCom, "g_DiffuseTextures", 0, m_pDiffuseTextureCom->Get_Size()))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pNormalTextureCom->Bind_ShaderResources(m_pShaderCom, "g_NormalTextures", 0, m_pNormalTextureCom->Get_Size()))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pMROTextureCom->Bind_ShaderResources(m_pShaderCom, "g_SurfaceParamsTextures", 0, m_pMROTextureCom->Get_Size()))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_SRV("g_MaskTexture", m_pMaskTextureCom->Get_SRV(0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fUsingSurfaceParams", &m_fUsingSurfaceParams, sizeof(_float))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -173,7 +206,10 @@ void CTerrain::Free()
|
||||
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pTextureCom);
|
||||
SAFE_RELEASE(m_pDiffuseTextureCom);
|
||||
SAFE_RELEASE(m_pNormalTextureCom);
|
||||
SAFE_RELEASE(m_pMROTextureCom);
|
||||
SAFE_RELEASE(m_pMaskTextureCom);
|
||||
}
|
||||
|
||||
void CTerrain::Describe_Entity()
|
||||
|
||||
@@ -29,11 +29,18 @@ class CTerrain final : public CGameObject
|
||||
private:
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Terrain* m_pVIBufferCom = { nullptr };
|
||||
CTexture* m_pTextureCom = { nullptr };
|
||||
CTexture* m_pDiffuseTextureCom = { nullptr };
|
||||
CTexture* m_pNormalTextureCom = { nullptr };
|
||||
CTexture* m_pMROTextureCom = { nullptr };
|
||||
CTexture* m_pMaskTextureCom = { nullptr };
|
||||
|
||||
_float m_fUsingSurfaceParams = {};
|
||||
_float m_fHeightRatio = {1.f};
|
||||
_float3 m_vPickingPosition = {};
|
||||
_float3 m_vRotation = {};
|
||||
_float m_fCullingRadius = { 0.2f };
|
||||
|
||||
_uint m_iTextureIndex = {};
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
|
||||
@@ -1317,10 +1317,10 @@ HRESULT CModel::Initialize(void* pArg)
|
||||
m_pTransform = m_pOwner->Get_Component<CTransform>();
|
||||
SAFE_ADDREF(m_pTransform);
|
||||
|
||||
Create_Con();
|
||||
/*Create_Con();
|
||||
|
||||
if (FAILED(Create_CS()))
|
||||
return E_FAIL;
|
||||
return E_FAIL;*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,19 @@ CQuadTree::CQuadTree()
|
||||
{
|
||||
}
|
||||
|
||||
void CQuadTree::Set_CullingRadius(_float fRadius)
|
||||
{
|
||||
m_fCullingRadius = fRadius;
|
||||
|
||||
if (nullptr == m_pChildren[CORNER_LT])
|
||||
return;
|
||||
|
||||
for (_uint i = 0; i < CORNER_END; i++)
|
||||
{
|
||||
m_pChildren[i]->Set_CullingRadius(fRadius);
|
||||
}
|
||||
}
|
||||
|
||||
void CQuadTree::Culling(CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices)
|
||||
{
|
||||
/* 해당 노드에서 그릴건지 확인 */
|
||||
@@ -158,7 +171,7 @@ void CQuadTree::Culling(CGameInstance* pGameInstance, const _float3* pVertexPosi
|
||||
/* Range 는 사각형의 중심에서 꼭짓점까지의 거리 */
|
||||
_float fRange = XMVector3Length(XMLoadFloat3(&pVertexPositions[m_iCorners[CORNER_LT]]) - XMLoadFloat3(&pVertexPositions[m_iCenter])).m128_f32[0];
|
||||
|
||||
if (true == pGameInstance->isIn_LocalFrustum(XMLoadFloat3(&pVertexPositions[m_iCenter]), fRange))
|
||||
if (true == pGameInstance->isIn_LocalFrustum(XMLoadFloat3(&pVertexPositions[m_iCenter]), fRange * 1.5f))
|
||||
{
|
||||
for (size_t i = 0; i < CORNER_END; i++)
|
||||
{
|
||||
@@ -262,9 +275,9 @@ _bool CQuadTree::Set_Y(CGameInstance* pGameInstance, const _float3* pVertexPosit
|
||||
{
|
||||
if (nullptr == m_pChildren[CORNER_LT])
|
||||
{
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_RT]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y += fY;
|
||||
|
||||
XMStoreFloat3(&Out, XMVector3TransformCoord(XMLoadFloat3(&Out), WorldMatrix));
|
||||
return true;
|
||||
@@ -276,9 +289,9 @@ _bool CQuadTree::Set_Y(CGameInstance* pGameInstance, const _float3* pVertexPosit
|
||||
{
|
||||
if (nullptr == m_pChildren[CORNER_LT])
|
||||
{
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_LB]].vPosition.y = fY;
|
||||
pVertices[m_iCorners[CORNER_LT]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_RB]].vPosition.y += fY;
|
||||
pVertices[m_iCorners[CORNER_LB]].vPosition.y += fY;
|
||||
|
||||
XMStoreFloat3(&Out, XMVector3TransformCoord(XMLoadFloat3(&Out), WorldMatrix));
|
||||
return true;
|
||||
@@ -303,7 +316,7 @@ _bool CQuadTree::isDraw(CGameInstance* pGameInstance, const _float3* pVertexPosi
|
||||
_vector vCamPos = XMLoadFloat4(pGameInstance->Get_CamPosition());
|
||||
_vector vCenter = XMLoadFloat3(&pVertexPositions[m_iCenter]);
|
||||
|
||||
if (m_iCorners[CORNER_RT] - m_iCorners[CORNER_LT] < XMVectorGetX(XMVector3Length(vCamPos - vCenter)) * 0.2f)
|
||||
if (m_iCorners[CORNER_RT] - m_iCorners[CORNER_LT] < XMVectorGetX(XMVector3Length(vCamPos - vCenter)) * 0.04f)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -104,23 +104,23 @@ HRESULT CVIBuffer_Terrain::Initialize_Prototype(const _char* pFilePath, _uint iS
|
||||
VTXNORTEX* pVertices = new VTXNORTEX[m_iNumVertices];
|
||||
ZeroMemory(pVertices, sizeof(VTXNORTEX) * m_iNumVertices);
|
||||
|
||||
m_pVertexPositions = new _float3[m_iNumVertices];
|
||||
m_pVertexPositions = new _float3[m_iNumVertices];
|
||||
ZeroMemory(m_pVertexPositions, sizeof(_float3) * m_iNumVertices);
|
||||
|
||||
for (_uint i = 0; i < m_iNumVerticesZ - 1; i++)
|
||||
for (_uint i = 0; i < m_iNumVerticesZ; i++)
|
||||
{
|
||||
for (_uint j = 0; j < m_iNumVerticesX - 1; j++)
|
||||
for (_uint j = 0; j < m_iNumVerticesX; j++)
|
||||
{
|
||||
_uint iIndex = i * m_iNumVerticesX + j;
|
||||
|
||||
m_pVertexPositions[iIndex] = pVertices[iIndex].vPosition = _float3(
|
||||
(_float)j * m_iNumVerticesX / (m_iNumVerticesX - 1.f),
|
||||
(_float)(pPixels[iIndex]) * 5 * 256.f,
|
||||
(_float)(pPixels[iIndex]) * 10.f * 256.f - 256.f,
|
||||
(_float)i * m_iNumVerticesZ / (m_iNumVerticesZ -1.f)
|
||||
);
|
||||
|
||||
m_HeigthValues.push_back((_float)(pPixels[iIndex]) * 10.f * 256.f - 256.f);
|
||||
pVertices[iIndex].vNormal = _float3(0.f, 0.f, 0.f);
|
||||
pVertices[iIndex].vTexcoord = _float2((_float)j / (m_iNumVerticesX - 1.f) / 32.f, (_float)i / (m_iNumVerticesZ - 1.f) / 32.f);
|
||||
pVertices[iIndex].vTexcoord = _float2((_float)j / (m_iNumVerticesX), (_float)i / m_iNumVerticesZ );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,6 +281,11 @@ void CVIBuffer_Terrain::Change_HeigthRatio(_float fRatio)
|
||||
m_pContext->Unmap(m_pVB, 0);
|
||||
}
|
||||
|
||||
void CVIBuffer_Terrain::Set_CullingRadius(_float fRaduis)
|
||||
{
|
||||
m_pQuadTree->Set_CullingRadius(fRaduis);
|
||||
}
|
||||
|
||||
CVIBuffer_Terrain* CVIBuffer_Terrain::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pFilePath, _uint iSizeX, _uint iSizeZ)
|
||||
{
|
||||
CVIBuffer_Terrain* pInstance = new CVIBuffer_Terrain(pDevice, pContext);
|
||||
|
||||
@@ -14,6 +14,11 @@ class CQuadTree final : public CBase
|
||||
virtual ~CQuadTree() = default;
|
||||
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
void Set_CullingRadius(_float fRadius);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
void Culling(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _uint* pIndices, _uint* pNumIndices);
|
||||
void SetUp_Neighbors();
|
||||
_bool Picking(class CGameInstance* pGameInstance, const _float3* pVertexPositions, _float3& Out, _fmatrix WorldMatrix);
|
||||
@@ -23,6 +28,8 @@ class CQuadTree final : public CBase
|
||||
_uint m_iCorners[CORNER_END] = { };
|
||||
_uint m_iCenter = {};
|
||||
|
||||
_float m_fCullingRadius = { 0.2f };
|
||||
|
||||
CQuadTree* m_pChildren[CORNER_END] = { nullptr };
|
||||
CQuadTree* m_pNeighbors[NEIGHBOR_END] = { nullptr, nullptr, nullptr, nullptr };
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ class ENGINE_DLL CVIBuffer_Terrain final : public CVIBuffer
|
||||
void FitY(_fmatrix WorldMatrix, _float fY);
|
||||
void Change_HeigthRatio(_float fRatio);
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Set_CullingRadius(_float fRaduis);
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
private:
|
||||
_bool m_bChange = {};
|
||||
_uint m_iNumVerticesX = {};
|
||||
|
||||
Reference in New Issue
Block a user