@@ -15,12 +15,12 @@ end_of_line = crlf
|
||||
|
||||
# hlsl 저장형식 지정
|
||||
[*.hlsl]
|
||||
charset = utf-8-bom
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = crlf
|
||||
|
||||
# hlsli 저장형식 지정
|
||||
[*.hlsli]
|
||||
charset = utf-8-bom
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
end_of_line = crlf
|
||||
|
||||
@@ -8,6 +8,7 @@ int g_iImageCountY;
|
||||
|
||||
float g_fFar;
|
||||
float g_fTime;
|
||||
float g_fTimeMult;
|
||||
float g_fFrame;
|
||||
float g_fAlpha;
|
||||
float g_fOwnerAlpha;
|
||||
@@ -16,8 +17,11 @@ float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
uint g_iQuestType;
|
||||
float g_fPI;
|
||||
|
||||
Texture2D g_Texture;
|
||||
Texture2D g_Texture1;
|
||||
@@ -64,7 +68,7 @@ struct PS_OUT
|
||||
float4 vColor : SV_Target0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In) // ?쇰컲 UI
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
@@ -142,19 +146,31 @@ PS_OUT PS_Cursor(PS_IN In)
|
||||
|
||||
Color = White;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (Color.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, uv);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 dir = uv - center;
|
||||
|
||||
float angle = atan2(dir.x, -dir.y);
|
||||
if (angle < 0)
|
||||
angle += g_fPI;
|
||||
|
||||
float rotation = saturate(g_fTime * g_fTimeMult) * g_fPI;
|
||||
|
||||
tex.rgb = (angle <= rotation) ? 1.0 : tex.rgb;
|
||||
|
||||
Out.vColor = tex;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -224,6 +240,52 @@ PS_OUT PS_UVMult(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_NineSlice(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Left = g_fNine_Slice.x / g_fOrigin_Size.x;
|
||||
float Right = (g_fOrigin_Size.x - g_fNine_Slice.y) / g_fOrigin_Size.x;
|
||||
float Top = g_fNine_Slice.z / g_fOrigin_Size.y;
|
||||
float Bottom = (g_fOrigin_Size.y - g_fNine_Slice.w) / g_fOrigin_Size.y;
|
||||
|
||||
float2 ratio = g_fCurrent_Size / g_fOrigin_Size;
|
||||
|
||||
float2 UV = In.vTexcoord * 0.5f + 0.5f;
|
||||
float2 ScaledUV = UV;
|
||||
|
||||
if(UV.x < Left)
|
||||
{
|
||||
ScaledUV.x = UV.x;
|
||||
}
|
||||
else if(UV.x > Right)
|
||||
{
|
||||
ScaledUV.x = 1.0f - ((1.0f - UV.x) / ratio.x);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaledUV.x = Left + (UV.x - Left) / ratio.x;
|
||||
}
|
||||
|
||||
if(UV.y < Top)
|
||||
{
|
||||
ScaledUV.y = UV.y;
|
||||
}
|
||||
else if(UV.y > Bottom)
|
||||
{
|
||||
ScaledUV.y = 1.0f - ((1.0f - UV.y) / ratio.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaledUV.y = Top + (UV.y - Top) / ratio.y;
|
||||
}
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, ScaledUV);
|
||||
|
||||
Out.vColor = color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -305,4 +367,15 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_UVMult();
|
||||
}
|
||||
|
||||
pass NineSlice
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, 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_NineSlice();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -129,6 +129,12 @@
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<FxCompile>
|
||||
<ShaderType>Effect</ShaderType>
|
||||
</FxCompile>
|
||||
<FxCompile>
|
||||
<ShaderModel>5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -183,6 +189,7 @@
|
||||
<ClInclude Include="..\public\MapObject_LOD.h" />
|
||||
<ClInclude Include="..\public\MapObject_Manager.h" />
|
||||
<ClInclude Include="..\public\MapObject_Static.h" />
|
||||
<ClInclude Include="..\Public\MainLight.h" />
|
||||
<ClInclude Include="..\public\Terrain.h" />
|
||||
<ClInclude Include="..\Public\Level_PhysXLab.h" />
|
||||
<ClInclude Include="..\Public\TestEffect.h" />
|
||||
@@ -248,6 +255,7 @@
|
||||
<ClCompile Include="..\private\MapObject_LOD.cpp" />
|
||||
<ClCompile Include="..\private\MapObject_Manager.cpp" />
|
||||
<ClCompile Include="..\private\MapObject_Static.cpp" />
|
||||
<ClCompile Include="..\Private\MainLight.cpp" />
|
||||
<ClCompile Include="..\private\Terrain.cpp" />
|
||||
<ClCompile Include="..\Private\Level_PhysXLab.cpp" />
|
||||
<ClCompile Include="..\Private\TestEffect.cpp" />
|
||||
|
||||
@@ -196,6 +196,9 @@
|
||||
<Filter Include="02.GameObjects\Dummys\DummySkyBox">
|
||||
<UniqueIdentifier>{12d17342-7cb4-46be-8243-9e1864496338}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\MainLight">
|
||||
<UniqueIdentifier>{a9360a97-5ef2-476a-9f12-f4e06c28290c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -396,6 +399,9 @@
|
||||
<ClInclude Include="..\Public\Information.h">
|
||||
<Filter>03.Information</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\MainLight.h">
|
||||
<Filter>02.GameObjects\MainLight</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -592,6 +598,9 @@
|
||||
<ClCompile Include="..\Private\Information.cpp">
|
||||
<Filter>03.Information</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\MainLight.cpp">
|
||||
<Filter>02.GameObjects\MainLight</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "Shader.h"
|
||||
|
||||
@@ -95,6 +95,9 @@ HRESULT CDebugCamera::Initialize(void* pArg)
|
||||
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
|
||||
m_pGameInstance->Add_Camera(NEXT_LEVEL, this, m_pCameraKey);
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, m_pCameraKey, false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +175,8 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
|
||||
m_pShaderCom->Describe_Entity();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("BLUR"))
|
||||
|
||||
@@ -134,6 +134,11 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
m_bElementFadeOut = static_cast<CElementObject*>(m_pElementObject)->Get_FadeOut();
|
||||
m_fAlphaTime = static_cast<CElementObject*>(m_pElementObject)->Get_AlphaTime();
|
||||
m_UV = static_cast<CElementObject*>(m_pElementObject)->Get_UV();
|
||||
|
||||
m_fLeft = static_cast<CElementObject*>(m_pElementObject)->Get_Nine_Slice_Left();
|
||||
m_fRight = static_cast<CElementObject*>(m_pElementObject)->Get_Nine_Slice_Right();
|
||||
m_fTop = static_cast<CElementObject*>(m_pElementObject)->Get_Nine_Slice_Top();
|
||||
m_fBottom = static_cast<CElementObject*>(m_pElementObject)->Get_Nine_Slice_Bottom();
|
||||
}
|
||||
GUI::Begin("Current_PanelObject_Info");
|
||||
if (m_pGamePlay_Canvas != nullptr)
|
||||
@@ -306,6 +311,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
static_cast<CElementObject*>(m_pElementObject)->SizeUpdate_float(m_fSizeXY);
|
||||
}
|
||||
|
||||
GUI::Text("Time");
|
||||
if (GUI::DragFloat("EndTime", &m_fEndTime, 0.01f, 0.f, 10.f))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_TimeMult(m_fEndTime);
|
||||
@@ -326,6 +332,7 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_AlphaTime(m_fAlphaTime);
|
||||
}
|
||||
|
||||
GUI::Text("UV");
|
||||
if (GUI::DragFloat("U", &m_UV.x, 0.01f, 0.f, 10.f))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_U(m_UV.x);
|
||||
@@ -335,6 +342,28 @@ void CIMGUIUI::Update(_float fTimeDelta)
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_V(m_UV.y);
|
||||
}
|
||||
|
||||
GUI::Text("Nine_Slice");
|
||||
if (GUI::DragFloat("Left", &m_fLeft, 0.1f, 0, m_fSize.x))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Nine_Slice_Left(m_fLeft);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("Right", &m_fRight, 0.1f,0.5f, m_fSize.x))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Nine_Slice_Right(m_fRight);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("Top", &m_fTop, 0.1f, 0, m_fSize.y))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Nine_Slice_Top(m_fTop);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("Bottom", &m_fBottom, 0.1f,0, m_fSize.y))
|
||||
{
|
||||
static_cast<CElementObject*>(m_pElementObject)->Nine_Slice_Bottom(m_fBottom);
|
||||
}
|
||||
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Level_EffectViewer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "TestEffect.h"
|
||||
#include "Effect_Editor.h"
|
||||
#include "Dummy_Cube.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -46,7 +47,7 @@ void CLevel_EffectViewer::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_EffectViewer::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("이펙트 레벨입니다"));
|
||||
SetWindowText(g_hWnd, TEXT("이펙트 레벨입니다"));
|
||||
GUI::ShowDemoWindow();
|
||||
return S_OK;
|
||||
}
|
||||
@@ -62,6 +63,7 @@ HRESULT CLevel_EffectViewer::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 = 5.f;
|
||||
CameraDesc.pCameraKey = TEXT("Debug_Camera");
|
||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||
CameraDesc.fMouseSensor = 0.1f;
|
||||
|
||||
@@ -74,17 +76,10 @@ HRESULT CLevel_EffectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_EffectViewer::Ready_Layer_Light()
|
||||
{
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMainLight>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "MapObject_Manager.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "DummySkyBox.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
CLevel_MapViewer::CLevel_MapViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -56,17 +57,10 @@ HRESULT CLevel_MapViewer::Initialize()
|
||||
|
||||
HRESULT CLevel_MapViewer::Ready_Layer_Light()
|
||||
{
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMainLight>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Level_ObjectViewer.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
@@ -11,7 +11,10 @@
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "DummyObject.h"
|
||||
|
||||
#include "DummySkyBox.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
|
||||
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -54,7 +57,7 @@ void CLevel_ObjectViewer::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("오브젝트 레벨입니다"));
|
||||
SetWindowText(g_hWnd, TEXT("오브젝트 레벨입니다"));
|
||||
//GUI::ShowDemoWindow();
|
||||
return S_OK;
|
||||
}
|
||||
@@ -464,6 +467,7 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
CameraDesc.vEye = _float3(0.f, 30.f, -10.f);
|
||||
CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
|
||||
CameraDesc.fSpeedPerSec = 5.f;
|
||||
CameraDesc.pCameraKey = TEXT("Debug_Camera");
|
||||
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
|
||||
CameraDesc.fMouseSensor = 0.1f;
|
||||
|
||||
@@ -476,17 +480,9 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_ObjectViewer::Ready_Layer_Light()
|
||||
{
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.2f, 0.2f, 0.2f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMainLight>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Level_PhysXLab.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "Dummy_PhysXMesh.h"
|
||||
#include "MapObject_Manager.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
CLevel_PhysXLab::CLevel_PhysXLab(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -24,7 +25,7 @@ void CLevel_PhysXLab::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_PhysXLab::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("PhysXEditor·¹º§ÀÔ´Ï´Ù"));
|
||||
SetWindowText(g_hWnd, TEXT("PhysXEditor레벨입니다"));
|
||||
GUI::ShowDemoWindow();
|
||||
return S_OK;
|
||||
}
|
||||
@@ -51,17 +52,9 @@ HRESULT CLevel_PhysXLab::Initialize()
|
||||
|
||||
HRESULT CLevel_PhysXLab::Ready_Layer_Light()
|
||||
{
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.vDirection = _float4(1.f, -1.f, 1.f, 0.f);
|
||||
|
||||
if (FAILED(m_pGameInstance->On_Light(NEXT_LEVEL, TEXT("Main_Light"), LightDesc, nullptr))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMainLight>(ENUM_CLASS(LEVEL::STATIC), NEXT_LEVEL, LAYER_LIGHT)))
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -70,10 +63,11 @@ HRESULT CLevel_PhysXLab::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
|
||||
CameraDesc.fFovy = XMConvertToRadians(60.0f);
|
||||
CameraDesc.fNear = 0.1f;
|
||||
CameraDesc.fFar = 5000.f;
|
||||
CameraDesc.fFar = 500.f;
|
||||
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;
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
#include "pch.h"
|
||||
#include "Loader.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
#pragma region DEFAULT_HEADER
|
||||
|
||||
#include "DebugCamera.h"
|
||||
#include "DummyRect.h"
|
||||
#include "MainApp.h"
|
||||
#include "Dummy_Cube.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region OBJECT_HEADER
|
||||
|
||||
@@ -222,6 +228,10 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMainLight>(g_iStaticLevel, CMainLight::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("Loading Success!");
|
||||
|
||||
m_isFinished = true;
|
||||
@@ -236,41 +246,42 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
m_strMessage = TEXT("Texture Loading..");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Keyboard"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Keyboard/Keyboard_%d.png"), 10)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LodingWidget1"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Loading/LoadingWidget.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Mission", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Border"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Border.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Key"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Key.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Finishi_Rect"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Finishi_Rect.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Main"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Mission_Main.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Mission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/Mission_Icon_%d.png"), 2)))) {
|
||||
@@ -292,6 +303,22 @@ HRESULT CLoader::Loading_For_UI()
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Loading", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
@@ -563,25 +590,29 @@ HRESULT CLoader::Loading_For_PhysXLevel()
|
||||
}
|
||||
|
||||
ModelPrototypeTags.push_back(strFileName);
|
||||
ModelPrototypePath.push_back(file.path());
|
||||
|
||||
_uint iNumMesh = pModel->Get_NumMeshes();
|
||||
{ /* cache rigidbody */ // More Info In 리지드바디, CCT, 엔진이넘
|
||||
ModelPrototypePath.push_back(file.path());
|
||||
|
||||
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;
|
||||
_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);
|
||||
{ // basic static RIGIDBODY
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMapObject_Manager>(g_iStaticLevel, CMapObject_Manager::Create(m_pDevice, m_pContext, ModelPrototypeTags, ModelPrototypePath)))){
|
||||
return E_FAIL;
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
#include "pch.h"
|
||||
#include "MainLight.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "DebugCamera.h"
|
||||
|
||||
CMainLight::CMainLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CMainLight::CMainLight(const CMainLight& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMainLight::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainLight::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Ready_Components()))
|
||||
return E_FAIL;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::LOOK, XMVectorSet(1.f, -1.f, 1.f, 0.f));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMainLight::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CMainLight::Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CMainLight::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CMainLight::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
HRESULT CMainLight::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
LIGHT_DESC LightDesc{};
|
||||
|
||||
LightDesc.eType = LIGHT::DIRECTIONAL;
|
||||
LightDesc.vDiffuse = _float4(0.8f, 0.8f, 0.8f, 0.f);
|
||||
LightDesc.vAmbient = _float4(0.6f, 0.6f, 0.6f, 0.f);
|
||||
LightDesc.vSpecular = _float4(0.f, 0.f, 0.f, 0.f);
|
||||
LightDesc.pDirection = m_pTransformCom->Get_StatePtr(STATE::LOOK);
|
||||
LightDesc.iLevel = NEXT_LEVEL;
|
||||
|
||||
/* Com_Light*/
|
||||
if (FAILED(Add_Component<CLight>(g_iStaticLevel, &m_pLightCom, &LightDesc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMainLight::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
CMainLight* CMainLight::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMainLight* pInstance = new CMainLight(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CMainLight");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CMainLight::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CMainLight* pInstance = new CMainLight(*this);
|
||||
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CMainLight");
|
||||
Safe_Release(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CMainLight::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
Safe_Release(m_pLightCom);
|
||||
}
|
||||
|
||||
void CMainLight::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -374,7 +374,7 @@ HRESULT CMapObject_Manager::Save_MapData(const _char* pFileName)
|
||||
#pragma endregion
|
||||
|
||||
|
||||
// ÀúÀå
|
||||
// ?ú?å
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
MSG_BOX("Failed to Save File");
|
||||
}
|
||||
@@ -498,7 +498,7 @@ HRESULT CMapObject_Manager::Save_ContainerData(const _char* pFileName, const _ch
|
||||
m_pSelectObject = nullptr;
|
||||
#pragma endregion
|
||||
|
||||
// ÀúÀå
|
||||
// ?ú?å
|
||||
if (doc.SaveFile(strPath.c_str()) != tinyxml2::XML_SUCCESS) {
|
||||
MSG_BOX("Failed to Save File");
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg)
|
||||
|
||||
Desc.fX = -248.f;
|
||||
Desc.fY = 100.f;
|
||||
Desc.fSizeX = 480.f;
|
||||
Desc.fSizeY = 240.f;
|
||||
Desc.fSizeX = 256.f;
|
||||
Desc.fSizeY = 128.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
@@ -110,7 +110,7 @@ HRESULT CMissionBanner_Border::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::UVMULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -170,6 +170,18 @@ HRESULT CMissionBanner_Border::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fCurrent_Posigion, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ HRESULT CMission_KeyHold::Initialize(void* pArg)
|
||||
m_fTimeMult = 1.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fPI = AI_MATH_TWO_PI_F;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -159,7 +160,11 @@ HRESULT CMission_KeyHold::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTimeMult", &m_fTimeMult, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fPI", &m_fPI, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Editor
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR ,END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, QUESTYPE, UVMULT, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, QUESTYPE, UVMULT, NINECLICE , END };
|
||||
}
|
||||
|
||||
using namespace Editor;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Editor {
|
||||
#define FX_INSTANCE_MODEL TEXT("FX_INSTANCE_MODEL")
|
||||
#define FX_UIEDITOR TEXT("FX_UIEDITOR")
|
||||
|
||||
|
||||
#pragma endregion
|
||||
#pragma region MACRO_PROTOTYPE
|
||||
#define CURRENT_LEVEL m_pGameInstance->Get_CurrentLevelID()
|
||||
@@ -50,6 +51,7 @@ namespace Editor {
|
||||
#define LAYER_DOT TEXT("Layer_Dot")
|
||||
#define LAYER_CELL TEXT("Layer_Cell")
|
||||
#define LAYER_TRIGGER TEXT("Layer_Trigger")
|
||||
#define LAYER_LIGHT TEXT("Layer_Light")
|
||||
|
||||
#define LAYER_MAPOBJECTMANAGER TEXT("Layer_MapObjectManager")
|
||||
|
||||
|
||||
@@ -46,6 +46,12 @@ class CIMGUIUI final : public CGameObject
|
||||
_float m_fAlpha{};
|
||||
_float2 m_UV{};
|
||||
|
||||
_float m_fLeft{};
|
||||
_float m_fRight{};
|
||||
_float m_fTop{};
|
||||
_float m_fBottom{};
|
||||
_float4 m_fNineSlice{};
|
||||
|
||||
_float2 m_fPanelPos{};
|
||||
_float2 m_fPanelSize{};
|
||||
_float3 m_fPanelSizeXY{};
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CLight;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CMainLight final : public CGameObject
|
||||
{
|
||||
|
||||
private:
|
||||
CMainLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CMainLight(const CMainLight& Prototype);
|
||||
virtual ~CMainLight() = default;
|
||||
|
||||
public:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
CLight* m_pLightCom = { nullptr };
|
||||
|
||||
private:
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources();
|
||||
|
||||
public:
|
||||
static CMainLight* 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
|
||||
@@ -31,6 +31,7 @@ class CMission_KeyHold final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float m_fPI{};
|
||||
|
||||
public:
|
||||
static CMission_KeyHold* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -135,6 +135,12 @@
|
||||
call Update_Lib.bat
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<FxCompile>
|
||||
<ShaderType>Effect</ShaderType>
|
||||
</FxCompile>
|
||||
<FxCompile>
|
||||
<ShaderModel>5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
<Filter Include="01.Utility\03.RenderTargets">
|
||||
<UniqueIdentifier>{d7596dbd-fa1c-414b-9f4e-f05a1a982434}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\04.Light">
|
||||
<UniqueIdentifier>{0c8440f6-63b2-4dcb-9cb8-4c2356106fd0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\05.Shadow">
|
||||
<UniqueIdentifier>{6f4f880c-b0f2-4fab-ba8b-0939f6bc9321}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -106,9 +103,6 @@
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Rect">
|
||||
<UniqueIdentifier>{5fec6152-84b6-4811-a2ee-f5f1044cc1eb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\04.Light\Manager">
|
||||
<UniqueIdentifier>{2bb63dcf-1503-446f-820e-03bfc3e1e38e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\20.Camera_Manager">
|
||||
<UniqueIdentifier>{b89f3382-3069-4263-8e56-6116866a2518}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -226,9 +220,6 @@
|
||||
<Filter Include="01.Utility\06.ComputeShader">
|
||||
<UniqueIdentifier>{96600587-16b1-4627-914d-7fc413c501ba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\06. Picking">
|
||||
<UniqueIdentifier>{a60a7ba5-a937-41d7-baac-db67f86f3ba1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\99.THIRDPARTY\PHYSX">
|
||||
<UniqueIdentifier>{5948985e-f67e-4627-aca4-09b8e9edc359}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -250,6 +241,15 @@
|
||||
<Filter Include="02.Element\01.GameObject\50.UI\ElementObject">
|
||||
<UniqueIdentifier>{1eafb189-2d0c-4ad7-8690-10a517668206}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="01.Utility\06.Picking">
|
||||
<UniqueIdentifier>{a60a7ba5-a937-41d7-baac-db67f86f3ba1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\02.Component\09.Light">
|
||||
<UniqueIdentifier>{7c82051e-19af-4284-8156-16f504db30b6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\03.Light_Manager">
|
||||
<UniqueIdentifier>{8727e975-e9e2-4b59-9a52-27ad3ad79f2f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
@@ -330,12 +330,6 @@
|
||||
<ClCompile Include="..\Private\Shadow.cpp">
|
||||
<Filter>01.Utility\05.Shadow</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light.cpp">
|
||||
<Filter>01.Utility\04.Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light_Manager.cpp">
|
||||
<Filter>01.Utility\04.Light\Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\imgui_demo.cpp">
|
||||
<Filter>99.Define\99.THIRDPARTY\IMGUI</Filter>
|
||||
</ClCompile>
|
||||
@@ -445,7 +439,7 @@
|
||||
<Filter>02.Element\02.Component\06.Model\Instance_Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Picking.cpp">
|
||||
<Filter>01.Utility\06. Picking</Filter>
|
||||
<Filter>01.Utility\06.Picking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\ComputeShader.cpp">
|
||||
<Filter>01.Utility\06.ComputeShader</Filter>
|
||||
@@ -465,6 +459,12 @@
|
||||
<ClCompile Include="..\private\PanelObject.cpp">
|
||||
<Filter>02.Element\01.GameObject\50.UI\PanelObject</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light.cpp">
|
||||
<Filter>02.Element\02.Component\09.Light</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Light_Manager.cpp">
|
||||
<Filter>03.Management\03.Light_Manager</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
@@ -932,12 +932,6 @@
|
||||
<ClInclude Include="..\Public\Shadow.h">
|
||||
<Filter>01.Utility\05.Shadow</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light.h">
|
||||
<Filter>01.Utility\04.Light</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light_Manager.h">
|
||||
<Filter>01.Utility\04.Light\Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Key_Manager.h">
|
||||
<Filter>00.System\00.Device\Input\00.Key_Manager</Filter>
|
||||
</ClInclude>
|
||||
@@ -1023,7 +1017,7 @@
|
||||
<Filter>01.Utility\06.ComputeShader</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Picking.h">
|
||||
<Filter>01.Utility\06. Picking</Filter>
|
||||
<Filter>01.Utility\06.Picking</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\VIBuffer_Terrain.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Terrain</Filter>
|
||||
@@ -1046,6 +1040,12 @@
|
||||
<ClInclude Include="..\public\PanelObject.h">
|
||||
<Filter>02.Element\01.GameObject\50.UI\PanelObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light.h">
|
||||
<Filter>02.Element\02.Component\09.Light</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Light_Manager.h">
|
||||
<Filter>03.Management\03.Light_Manager</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Camera.h"
|
||||
|
||||
CCamera::CCamera(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -32,6 +32,7 @@ HRESULT CCamera::Initialize(void* pArg)
|
||||
m_fFar = pDesc->fFar;
|
||||
m_bActive = false;
|
||||
m_iPriority = pDesc->iPriority;
|
||||
m_pCameraKey = pDesc->pCameraKey;
|
||||
m_pFollowTarget = pDesc->pFollowTarget;
|
||||
SAFE_ADDREF(m_pFollowTarget);
|
||||
m_pLookTarget = pDesc->pLookTarget;
|
||||
@@ -81,12 +82,12 @@ void CCamera::Transition(_float fTimeDelta)
|
||||
void CCamera::Active_Camera(pair<_float4, _float3>& pairTransitionInfo)
|
||||
{
|
||||
//if (true == m_bTransitionLerp) {
|
||||
m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(XMVectorSplatOne(), XMVectorZero(),
|
||||
XMLoadFloat4(&pairTransitionInfo.first), XMLoadFloat3(&pairTransitionInfo.second)));
|
||||
m_fTransitionCurrentTime = 0.f;
|
||||
m_bIsCurrentTransition = true;
|
||||
// m_pTransformCom->Set_WorldMatrix(XMMatrixAffineTransformation(XMVectorSplatOne(), XMVectorZero(),
|
||||
// XMLoadFloat4(&pairTransitionInfo.first), XMLoadFloat3(&pairTransitionInfo.second)));
|
||||
// m_fTransitionCurrentTime = 0.f;
|
||||
// m_bIsCurrentTransition = true;
|
||||
//}
|
||||
//m_bActive = true;
|
||||
m_bActive = true;
|
||||
}
|
||||
|
||||
void CCamera::DeActive_Camera(pair<_float4, _float3>& pairTransition)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Camera_Manager.h"
|
||||
#include "Camera.h"
|
||||
#include "GameInstance.h"
|
||||
@@ -66,6 +66,14 @@ HRESULT CCamera_Manager::IsBinded_Camera(const _wstring& wstrCameraKey)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
void CCamera_Manager::Force_CamPosition(_fvector vPos)
|
||||
{
|
||||
if (nullptr == m_pCurrentMainCamera)
|
||||
return;
|
||||
|
||||
m_pCurrentMainCamera->Get_Component<CTransform>()->Set_State(STATE::POSITION, XMVectorSetW(vPos, 1.f));
|
||||
}
|
||||
|
||||
const _float* CCamera_Manager::Get_CurrentCameraFar()
|
||||
{
|
||||
return &m_fFar;
|
||||
@@ -92,9 +100,13 @@ CCamera* CCamera_Manager::Find_Camera(_uint iLevel, const _wstring& wstrCameraKe
|
||||
HRESULT CCamera_Manager::Clear_Cameras(_uint iLevel)
|
||||
{
|
||||
if (nullptr != m_pCurrentMainCamera) {
|
||||
pair<_float4, _float3> pairTransitionInfo = { };
|
||||
m_pCurrentMainCamera->DeActive_Camera(pairTransitionInfo);
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
for (pair<const _wstring, CCamera*>& pairCamera : m_Cameras[iLevel]) {
|
||||
if (m_pCurrentMainCamera == pairCamera.second) {
|
||||
pair<_float4, _float3> pairTransitionInfo = { };
|
||||
m_pCurrentMainCamera->DeActive_Camera(pairTransitionInfo);
|
||||
SAFE_RELEASE(m_pCurrentMainCamera);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto& iter : m_Cameras[iLevel]) {
|
||||
SAFE_RELEASE(iter.second);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
@@ -29,7 +29,7 @@ HRESULT CCharacter_Controller::Render()
|
||||
{
|
||||
case ACTOR::BOX:
|
||||
{
|
||||
// vVolume = half-extents(Hx,Hy,Hz) 라고 가정
|
||||
// vVolume = half-extents(Hx,Hy,Hz) 라고 가정
|
||||
const _matrix ScaleMatrix =
|
||||
XMMatrixScaling(vVolume.x / 0.5f,
|
||||
vVolume.y / 0.5f,
|
||||
@@ -129,13 +129,13 @@ _float3 CCharacter_Controller::Get_Volume()
|
||||
|
||||
void CCharacter_Controller::Move(_float fTimeDelta)
|
||||
{
|
||||
PSX::PxVec3 pxVecMomentum = {}; // 순간 이동량
|
||||
_float fMinimumDistant = FLT_EPSILON3; // 이동량 오차 허용치, ( 크면 클수록 이동이 더 일찍 끝난다, 순간 이동량보다 같거나 더 크면 안움직일듯? )
|
||||
PSX::PxVec3 pxVecMomentum = {}; // 순간 이동량
|
||||
_float fMinimumDistant = FLT_EPSILON3; // 이동량 오차 허용치, ( 크면 클수록 이동이 더 일찍 끝난다, 순간 이동량보다 같거나 더 크면 안움직일듯? )
|
||||
_vector vMomentum = m_pTransform->Get_CurrentMomentum();
|
||||
XMStoreFloat3((_float3*)&pxVecMomentum, vMomentum);
|
||||
|
||||
PSX::PxControllerFilters pxFilter = {}; // 충돌 대상 필터
|
||||
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
||||
PSX::PxControllerFilters pxFilter = {}; // 충돌 대상 필터
|
||||
const PSX::PxObstacleContext* pPxObstacles = { nullptr }; // 캐릭터가 충돌해야할 추가적인 장애물 객체?, 닿은 장애물은 캐시된다?
|
||||
|
||||
|
||||
// eCOLLISION_SIDES = (1 << 0), //!< Character is colliding to the sides.
|
||||
@@ -209,7 +209,7 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
PSX::PxCapsuleControllerDesc Desc{};
|
||||
Desc.radius = pDesc->tCapsuleInfo.fRadius;
|
||||
Desc.height = pDesc->tCapsuleInfo.fHeight;
|
||||
Desc.climbingMode = pDesc->tCapsuleInfo.eClimbingMode; // 기본 eEASY
|
||||
Desc.climbingMode = pDesc->tCapsuleInfo.eClimbingMode; // 기본 eEASY
|
||||
Desc.contactOffset = pDesc->fContactOffset;
|
||||
Desc.material = m_pGameInstance->Get_Material(&pDesc->fMaterial);
|
||||
m_pController = m_pGameInstance->Add_CapsuleController(Desc);
|
||||
@@ -220,7 +220,7 @@ HRESULT CCharacter_Controller::Initialize(void* pArg)
|
||||
#endif // _DEBUG
|
||||
} break;
|
||||
default:
|
||||
assert(false); // PhysX에서 불가능
|
||||
assert(false); // PhysX에서 불가능
|
||||
return E_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ void CElementObject::Update(_float fTimeDelta)
|
||||
0.f, 1.f));
|
||||
|
||||
m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f);
|
||||
m_vNine_Slice = _float4(m_fLeft, m_fRight, m_fTop, m_fBottom);
|
||||
}
|
||||
|
||||
void CElementObject::Late_Update(_float fTimeDelta)
|
||||
@@ -79,6 +80,46 @@ _bool CElementObject::Chack_Visible()
|
||||
return m_bVisible;
|
||||
}
|
||||
|
||||
void CElementObject::Nine_Slice_Left(_float X)
|
||||
{
|
||||
m_fLeft = X;
|
||||
}
|
||||
|
||||
void CElementObject::Nine_Slice_Right(_float Y)
|
||||
{
|
||||
m_fRight = Y;
|
||||
}
|
||||
|
||||
void CElementObject::Nine_Slice_Top(_float Z)
|
||||
{
|
||||
m_fTop = Z;
|
||||
}
|
||||
|
||||
void CElementObject::Nine_Slice_Bottom(_float W)
|
||||
{
|
||||
m_fBottom = W;
|
||||
}
|
||||
|
||||
_float CElementObject::Get_Nine_Slice_Left()
|
||||
{
|
||||
return m_fLeft;
|
||||
}
|
||||
|
||||
_float CElementObject::Get_Nine_Slice_Right()
|
||||
{
|
||||
return m_fRight;
|
||||
}
|
||||
|
||||
_float CElementObject::Get_Nine_Slice_Top()
|
||||
{
|
||||
return m_fTop;
|
||||
}
|
||||
|
||||
_float CElementObject::Get_Nine_Slice_Bottom()
|
||||
{
|
||||
return m_fBottom;
|
||||
}
|
||||
|
||||
HRESULT CElementObject::Ready_Components(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Prototype_Manager.h"
|
||||
#include "GameObject_Manager.h"
|
||||
@@ -140,7 +140,8 @@ void CGameInstance::Clear_Resources(_uint iLevelIndex)
|
||||
m_pPrototype_Manager->Clear_Resource(iLevelIndex);
|
||||
m_pCamera_Manager->Clear_Cameras(iLevelIndex);
|
||||
m_pObject_Manager->Clear(iLevelIndex);
|
||||
m_pLight_Manager->Change_Level(iLevelIndex);
|
||||
m_pLight_Manager->Light_Clear(iLevelIndex);
|
||||
|
||||
}
|
||||
|
||||
_float CGameInstance::Random_Normal()
|
||||
@@ -314,23 +315,23 @@ void CGameInstance::Present_TimeCost() const
|
||||
|
||||
float minY = 0.f;
|
||||
float maxY = 0.025f;
|
||||
//float threshold = 166.f / 250.f; // 약 0.664f
|
||||
//float threshold = 166.f / 250.f; // 약 0.664f
|
||||
ImVec2 graph_size(0, 80.0f);
|
||||
ImVec2 start_pos = GUI::GetCursorScreenPos();
|
||||
|
||||
GUI::PlotLines("##FrameCount", values, IM_ARRAYSIZE(values), values_offset,
|
||||
overlay, minY, maxY, ImVec2(0, 80.0f));
|
||||
|
||||
// PlotLines의 실제 표시 영역 가져오기
|
||||
// PlotLinesì�˜ ì‹¤ì œ 표시 ì˜�ì— ê°€ì ¸ì˜¤ê¸°
|
||||
ImVec2 plot_min = GUI::GetItemRectMin();
|
||||
ImVec2 plot_max = GUI::GetItemRectMax();
|
||||
|
||||
// 기준선 (60FPS)
|
||||
float threshold = 1.0f / 60.0f; // 0.0166초
|
||||
// ê¸°ì¤€ì„ (60FPS)
|
||||
float threshold = 1.0f / 60.0f; // 0.0166ì´ˆ
|
||||
float normalized = (threshold - minY) / (maxY - minY);
|
||||
float y = plot_max.y - normalized * (plot_max.y - plot_min.y);
|
||||
|
||||
// 빨간 선 그리기
|
||||
// 빨간 ì„ ê·¸ë¦¬ê¸°
|
||||
ImDrawList* draw_list = GUI::GetWindowDrawList();
|
||||
draw_list->AddLine(
|
||||
ImVec2(plot_min.x, y),
|
||||
@@ -429,20 +430,27 @@ const _vector CGameInstance::Get_CamXMPosition()
|
||||
return m_pPipeLine->Get_CamXMPosition();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::On_Light(_uint iLevel, const _wstring& wstrLightKey, const LIGHT_DESC& LightDesc, CLight** ppOut)
|
||||
void CGameInstance::Add_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
{
|
||||
return m_pLight_Manager->On_Light(iLevel, wstrLightKey, LightDesc, ppOut);
|
||||
}
|
||||
HRESULT CGameInstance::Off_Light(_uint iLevel, const _wstring& wstrLightKey)
|
||||
{
|
||||
return m_pLight_Manager->Off_Light(iLevel, wstrLightKey);
|
||||
m_pLight_Manager->Add_Light(_iCurrentLevel, _pLight);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Render_Lights(class CShader* pShader, class CVIBuffer* pVIBuffer)
|
||||
void CGameInstance::Delete_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
{
|
||||
return m_pLight_Manager->Render_Lights(pShader, pVIBuffer);
|
||||
m_pLight_Manager->Delete_Light(_iCurrentLevel, _pLight);
|
||||
}
|
||||
|
||||
const LIGHT_DESC* CGameInstance::Get_Light_Info(_uint _iCurrentLevel, _uint _iLightIndex)
|
||||
{
|
||||
return m_pLight_Manager->Get_Light_Info(_iCurrentLevel, _iLightIndex);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Render_Lights(_uint _iCurrentLevel, CShader* pShader, CVIBuffer* pVIBuffer)
|
||||
{
|
||||
return m_pLight_Manager->Render_Lights(_iCurrentLevel, pShader, pVIBuffer);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGameInstance::Add_ColliderGroup(_uint iColliderGroup, class CCollider* pBounding)
|
||||
{
|
||||
return m_pCollider_Manager->Add_ColliderGroup(iColliderGroup, pBounding);
|
||||
@@ -492,14 +500,14 @@ HRESULT CGameInstance::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Tex
|
||||
return m_pRenderTarget_Manager->Copy_RenderTarget(strTargetTag, pTexture2D);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Ready_RenderTarget_Debug(const _wstring& strTargetTag, _float fX, _float fY, _float fSizeX, _float fSizeY)
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
return m_pRenderTarget_Manager->Ready_RenderTarget_Debug(strTargetTag, fX, fY, fSizeX, fSizeY);
|
||||
m_pRenderTarget_Manager->RenderTarget_Debuger();
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Render_RenderTarget_Debug(const _wstring& strMRTTag, CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
HRESULT CGameInstance::Render_RenderTarget_Debug(CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Render_RenderTarget_Debug(strMRTTag, pShader, pVIBuffer);
|
||||
return m_pRenderTarget_Manager->Render_RenderTarget_Debug(pShader, pVIBuffer);
|
||||
}
|
||||
HRESULT CGameInstance::Clear_Cameras(_uint iLevel)
|
||||
{
|
||||
@@ -525,6 +533,10 @@ const _float* CGameInstance::Get_CurrentCameraFar()
|
||||
{
|
||||
return m_pCamera_Manager->Get_CurrentCameraFar();
|
||||
}
|
||||
void CGameInstance::Force_CamPosition(_fvector vPos)
|
||||
{
|
||||
return m_pCamera_Manager->Force_CamPosition(vPos);
|
||||
}
|
||||
HRESULT CGameInstance::Ready_Shadow_Light(const SHADOW_LIGHT_DESC& Desc)
|
||||
{
|
||||
return m_pShadow->Ready_Shadow_Light(Desc);
|
||||
@@ -561,7 +573,7 @@ SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Get_Material(_float3* vMatInfo)
|
||||
{
|
||||
return m_pPhysX_Manager->Get_Material(vMatInfo);
|
||||
return m_pPhysX_Manager->Create_Material(vMatInfo);
|
||||
}
|
||||
|
||||
void CGameInstance::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh)
|
||||
@@ -720,7 +732,6 @@ void CGameInstance::Release_Engine()
|
||||
SAFE_RELEASE(m_pShadow);
|
||||
SAFE_RELEASE(m_pCamera_Manager);
|
||||
SAFE_RELEASE(m_pRenderTarget_Manager);
|
||||
SAFE_RELEASE(m_pLight_Manager);
|
||||
SAFE_RELEASE(m_pPipeLine);
|
||||
SAFE_RELEASE(m_pKey_Manager);
|
||||
SAFE_RELEASE(m_pMouse_Manager);
|
||||
@@ -729,6 +740,7 @@ void CGameInstance::Release_Engine()
|
||||
SAFE_RELEASE(m_pObject_Manager);
|
||||
SAFE_RELEASE(m_pLevel_Manager);
|
||||
SAFE_RELEASE(m_pPrototype_Manager);
|
||||
SAFE_RELEASE(m_pLight_Manager); // Light Manager´Â m_pObject_Manager º¸´Ù »¡¸® ºÒ·Á¾ßÇÔ
|
||||
SAFE_RELEASE(m_pGraphic_Device);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "GameObject_Manager.h"
|
||||
|
||||
#include "Layer.h"
|
||||
@@ -15,7 +15,7 @@ HRESULT CGameObject_Manager::Initialize(_uint iNumLevels)
|
||||
m_iNumLevels = iNumLevels;
|
||||
|
||||
m_pLayers = new map<const _wstring, CLayer*>[iNumLevels];
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ HRESULT CGameObject_Manager::Add_GameObject_ToLayer(_uint iLayerLevelIndex, cons
|
||||
|
||||
void CGameObject_Manager::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
Describe_Entity();
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Compute_TimeDelta(TEXT("Timer_PriorityUpdate"));
|
||||
#endif // _DEBUG
|
||||
@@ -157,3 +158,46 @@ void CGameObject_Manager::Free()
|
||||
|
||||
Safe_Delete_Array(m_pLayers);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CGameObject_Manager::Describe_Entity()
|
||||
{
|
||||
ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar;
|
||||
GUI::Begin("Object_Manager");
|
||||
GUI::Text("Levels : "); GUI::SameLine();
|
||||
if (GUI::BeginTabBar("Levels")) {
|
||||
for (_uint i = 0; i < m_iNumLevels; ++i) {
|
||||
|
||||
if (GUI::BeginTabItem(to_string(i).c_str(), nullptr)) { // Insert Here Level Names
|
||||
GUI::BeginChild("Object_Lists");
|
||||
if (GUI::BeginTabBar("Layers")) {
|
||||
string strlayerName;
|
||||
for (pair< const _wstring, CLayer*>& pairLayer : m_pLayers[i]) {
|
||||
size_t pos = pairLayer.first.find(TEXT("Layer_"));
|
||||
strlayerName = "NOT_STARTED_WITH_Layer_";
|
||||
if (pos != wstring::npos) {
|
||||
strlayerName = CMyTools::ToString(pairLayer.first.c_str() + pos + wcslen(TEXT("Layer_"))).c_str();
|
||||
}
|
||||
if (GUI::BeginTabItem(strlayerName.c_str(), nullptr)) {
|
||||
if (GUI::BeginChild("Items", ImVec2(0, 0), 0, window_flags)) {
|
||||
pairLayer.second->Describe_Entity();
|
||||
GUI::EndChild();
|
||||
}
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
}
|
||||
GUI::EndChild();
|
||||
GUI::EndTabItem();
|
||||
}
|
||||
}
|
||||
GUI::EndTabBar();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Layer.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CLayer::CLayer()
|
||||
{
|
||||
}
|
||||
|
||||
CLayer::~CLayer()
|
||||
CLayer::CLayer():
|
||||
m_pGameInstance(CGameInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pGameInstance);
|
||||
}
|
||||
|
||||
HRESULT CLayer::Initialize()
|
||||
@@ -89,9 +87,9 @@ void CLayer::Free()
|
||||
for (auto& iter : m_ObjectList)
|
||||
{
|
||||
SAFE_RELEASE(iter);
|
||||
}
|
||||
} m_ObjectList.clear();
|
||||
|
||||
m_ObjectList.clear();
|
||||
SAFE_RELEASE(m_pGameInstance);
|
||||
}
|
||||
|
||||
CLayer* CLayer::Create()
|
||||
@@ -106,3 +104,21 @@ CLayer* CLayer::Create()
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CLayer::Describe_Entity()
|
||||
{
|
||||
_int iIndex = 0;
|
||||
|
||||
for (CGameObject*& iter : m_ObjectList)
|
||||
{
|
||||
GUI::PushID(iter);
|
||||
if (GUI::SmallButton((to_string(iIndex) + " : " + typeid(*iter).name()).c_str())) {
|
||||
m_pGameInstance->Force_CamPosition(iter->Get_WorldPostion() - XMVectorSet(0.f, -1.f, 1.f, 0.f) * 10.f);
|
||||
} iIndex++;
|
||||
GUI::PopID();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -2,11 +2,20 @@
|
||||
#include "Light.h"
|
||||
#include "Shader.h"
|
||||
#include "VIBuffer.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CLight::CLight()
|
||||
|
||||
CLight::CLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CLight::CLight(const CLight& rhs)
|
||||
: CComponent{ rhs }
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
_bool CLight::operator==(const CLight& rhs) const
|
||||
{
|
||||
return this->operator==(rhs.m_LightDesc);
|
||||
@@ -14,36 +23,36 @@ _bool CLight::operator==(const CLight& rhs) const
|
||||
|
||||
_bool CLight::operator==(const LIGHT_DESC& rhs) const
|
||||
{
|
||||
_float4 vSrcPositon = *m_LightDesc.pPosition;
|
||||
_float4 vDstPositon = *rhs.pPosition;
|
||||
|
||||
if (m_LightDesc.eType != rhs.eType ||
|
||||
m_LightDesc.vPosition.x != rhs.vPosition.x ||
|
||||
m_LightDesc.vPosition.y != rhs.vPosition.y ||
|
||||
m_LightDesc.vPosition.z != rhs.vPosition.z) {
|
||||
vSrcPositon.x != vDstPositon.x ||
|
||||
vSrcPositon.y != vDstPositon.y ||
|
||||
vSrcPositon.z != vDstPositon.z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
HRESULT CLight::Replace_LightTo(_fvector vPosition)
|
||||
HRESULT CLight::Initialize_Prototype()
|
||||
{
|
||||
//GUI::Begin("Light_Position");
|
||||
//GUI::SliderFloat("fRange", (_float*)&m_LightDesc.fRange, 0.f, 30.f);
|
||||
//GUI::SliderFloat4("vDiffuse", (_float*)&m_LightDesc.vDiffuse, 0.f, 1.f);
|
||||
//GUI::SliderFloat4("vAmbient", (_float*)&m_LightDesc.vAmbient, 0.f, 1.f);
|
||||
//GUI::SliderFloat4("vSpecular", (_float*)&m_LightDesc.vSpecular, 0.f, 1.f);
|
||||
//GUI::SliderFloat3("fAngle", (_float*)&m_LightDesc.vDirection.x, -1.f, 1.f);
|
||||
//GUI::SliderFloat("fSpotInner", (_float*)&m_LightDesc.vSpotAngles.x, 0.f, 1.f);
|
||||
//GUI::SliderFloat("fSpotOutter", (_float*)&m_LightDesc.vSpotAngles.y, 0.f, 1.f);
|
||||
//GUI::End();
|
||||
if (LIGHT::POINT == m_LightDesc.eType || LIGHT::SPOT == m_LightDesc.eType) {
|
||||
XMStoreFloat4(&m_LightDesc.vPosition, vPosition);
|
||||
return S_OK;
|
||||
}
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLight::Initialize(const LIGHT_DESC& LightDesc)
|
||||
HRESULT CLight::Initialize(void* pArg)
|
||||
{
|
||||
m_LightDesc = LightDesc;
|
||||
LIGHT_DESC* pLightDesc = static_cast<LIGHT_DESC*>(pArg);
|
||||
|
||||
if (nullptr == pLightDesc)
|
||||
return E_FAIL;
|
||||
|
||||
m_LightDesc = *pLightDesc;
|
||||
|
||||
m_pGameInstance->Add_Light(m_LightDesc.iLevel, this);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -51,16 +60,16 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
{
|
||||
_uint iPassIndex = { 0 };
|
||||
if (LIGHT::DIRECTIONAL == m_LightDesc.eType) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", &m_LightDesc.vDirection, sizeof(_float4)))) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", m_LightDesc.pDirection, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::DIRECTIONAL);
|
||||
}
|
||||
else if (LIGHT::SPOT == m_LightDesc.eType) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", &m_LightDesc.vDirection, sizeof(_float4)))) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightDir", m_LightDesc.pDirection, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", &m_LightDesc.vPosition, sizeof(_float4)))) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", m_LightDesc.pPosition, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
@@ -75,7 +84,7 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
iPassIndex = ENUM_CLASS(SHADER_PASS_DEFERRED::SPOT);
|
||||
}
|
||||
else {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", &m_LightDesc.vPosition, sizeof(_float4)))) {
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightPos", m_LightDesc.pDirection, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightRange", &m_LightDesc.fRange, sizeof(_float)))) {
|
||||
@@ -99,13 +108,15 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
}
|
||||
|
||||
return pVIBuffer->Render();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
CLight* CLight::Create(const LIGHT_DESC& LightDesc)
|
||||
{
|
||||
CLight* pInstance = new CLight();
|
||||
|
||||
if (FAILED(pInstance->Initialize(LightDesc)))
|
||||
CLight* CLight::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLight* pInstance = new CLight(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CLight");
|
||||
SAFE_RELEASE(pInstance);
|
||||
@@ -114,9 +125,47 @@ CLight* CLight::Create(const LIGHT_DESC& LightDesc)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CComponent* CLight::Clone(void* pArg, class CGameObject* pOwner)
|
||||
{
|
||||
CLight* pInstance = new CLight(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CLight");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CLight::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CLight::Describe_Entity()
|
||||
{
|
||||
if (ImGui::TreeNode("LIGHT"))
|
||||
{
|
||||
ImGui::Separator(); ImGui::Spacing();
|
||||
|
||||
const char* pLightTypeNames[] = { "DIRECTIONAL", "POINT", "SPOT" };
|
||||
|
||||
int iCurrentItem = static_cast<int>(m_LightDesc.eType);
|
||||
|
||||
if (ImGui::Combo("LightType", &iCurrentItem, pLightTypeNames, ENUM_CLASS(LIGHT::END)))
|
||||
{
|
||||
m_LightDesc.eType = static_cast<LIGHT>(iCurrentItem);
|
||||
}
|
||||
|
||||
ImGui::DragFloat4("Diffuse", reinterpret_cast<float*>(&m_LightDesc.vDiffuse));
|
||||
ImGui::DragFloat4("Ambient", reinterpret_cast<float*>(&m_LightDesc.vAmbient));
|
||||
ImGui::DragFloat4("Specular", reinterpret_cast<float*>(&m_LightDesc.vSpecular));
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
@@ -6,92 +6,95 @@ CLight_Manager::CLight_Manager()
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CLight_Manager::On_Light(_uint iLevel, const _wstring& wstrLightKey, const LIGHT_DESC& LightDesc, class CLight** ppOut)
|
||||
|
||||
|
||||
|
||||
HRESULT CLight_Manager::Initialize(_uint iNumLevels)
|
||||
{
|
||||
list<CLight*>* pLights = Find_Lights(iLevel, wstrLightKey);
|
||||
if (nullptr != pLights) {
|
||||
if (*(*pLights).front() == LightDesc) { // 같은 종류, 같은 위치의 광원은 추가하지 않음
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
else if (nullptr == pLights) {
|
||||
pLights = new list<CLight*>();
|
||||
m_pLights[iLevel].emplace(wstrLightKey, pLights);
|
||||
}
|
||||
CLight* pLight = CLight::Create(LightDesc);
|
||||
if (nullptr == pLight) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != ppOut) {
|
||||
*ppOut = pLight;
|
||||
}
|
||||
pLights->push_back(pLight);
|
||||
m_iLevelNumber = iNumLevels;
|
||||
|
||||
m_Lights = new list<class CLight*>[m_iLevelNumber];
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLight_Manager::Off_Light(_uint iLevel, const _wstring& wstrLightKey)
|
||||
void CLight_Manager::Add_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
{
|
||||
map<_wstring, list<CLight*>*>::iterator iter = m_pLights[iLevel].find(wstrLightKey);
|
||||
if (iter == m_pLights[iLevel].end()) {
|
||||
return E_FAIL;
|
||||
if (nullptr == _pLight)
|
||||
return;
|
||||
|
||||
m_Lights[_iCurrentLevel].push_back(_pLight);
|
||||
|
||||
SAFE_ADDREF(_pLight);
|
||||
|
||||
}
|
||||
|
||||
void CLight_Manager::Delete_Light(_uint _iCurrentLevel, CLight* _pLight)
|
||||
{
|
||||
for (auto iter = m_Lights[_iCurrentLevel].begin(); iter != m_Lights[_iCurrentLevel].end();)
|
||||
{
|
||||
if (*iter == _pLight)
|
||||
{
|
||||
SAFE_RELEASE(_pLight);
|
||||
|
||||
iter = m_Lights[_iCurrentLevel].erase(iter);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
for (auto& pLight : *(*iter).second) {
|
||||
}
|
||||
|
||||
void CLight_Manager::Light_Clear(_uint _iCurrentLevel)
|
||||
{
|
||||
for (auto& pLight : m_Lights[_iCurrentLevel])
|
||||
{
|
||||
SAFE_RELEASE(pLight);
|
||||
}
|
||||
Safe_Delete((*iter).second);
|
||||
(m_pLights[iLevel]).erase(iter);
|
||||
return S_OK;
|
||||
|
||||
m_Lights[_iCurrentLevel].clear();
|
||||
}
|
||||
|
||||
HRESULT CLight_Manager::Render_Lights(CShader* pShader, CVIBuffer* pVIBuffer)
|
||||
const LIGHT_DESC* CLight_Manager::Get_Light_Info(_uint _iCurrentLevel, _uint _iLightIndex)
|
||||
{
|
||||
for (_uint i = 0; i < m_iNumLevel; ++i) {
|
||||
for (auto& pairLight : m_pLights[i])
|
||||
{
|
||||
for (auto& pLight : *pairLight.second) {
|
||||
if (FAILED((pLight)->Render(pShader, pVIBuffer))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLight_Manager::Change_Level(_uint iLevel)
|
||||
{
|
||||
for (auto& pairLight : m_pLights[iLevel]) {
|
||||
for (auto& pLight : *pairLight.second) {
|
||||
SAFE_RELEASE(pLight);
|
||||
}
|
||||
Safe_Delete(pairLight.second);
|
||||
} m_pLights[iLevel].clear();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
list<CLight*>* CLight_Manager::Find_Lights(_uint iLevel, const _wstring& wstrLightKey)
|
||||
{
|
||||
map<_wstring, list<CLight*>*>::iterator iter = m_pLights[iLevel].find(wstrLightKey);
|
||||
if (iter == m_pLights[iLevel].end()) {
|
||||
if (_iLightIndex >= m_Lights[_iCurrentLevel].size())
|
||||
return nullptr;
|
||||
|
||||
auto iter = m_Lights[_iCurrentLevel].begin();
|
||||
|
||||
for (size_t i = 0; i < _iLightIndex; i++)
|
||||
{
|
||||
iter++;
|
||||
}
|
||||
return iter->second;
|
||||
|
||||
return (*iter)->Get_LightDesc();
|
||||
}
|
||||
|
||||
HRESULT CLight_Manager::Initialize(_uint iLevelNumber)
|
||||
|
||||
HRESULT CLight_Manager::Render_Lights(_uint _iCurrentLevel, CShader* pShader, CVIBuffer* pVIBuffer)
|
||||
{
|
||||
m_iNumLevel = iLevelNumber;
|
||||
m_pLights = new map<_wstring, list<CLight*>*>[iLevelNumber];
|
||||
|
||||
for (auto& pLight : m_Lights[_iCurrentLevel])
|
||||
{
|
||||
pLight->Render(pShader, pVIBuffer);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
CLight_Manager* CLight_Manager::Create(_uint iLevelNumber)
|
||||
{
|
||||
CLight_Manager* pInstance = new CLight_Manager();
|
||||
|
||||
if (FAILED(pInstance->Initialize(iLevelNumber))) {
|
||||
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
@@ -99,12 +102,18 @@ void CLight_Manager::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
for (_uint i = 0; i < m_iNumLevel; ++i) {
|
||||
for (auto& pairLight : m_pLights[i]) {
|
||||
for (auto& pLight : *pairLight.second) {
|
||||
SAFE_RELEASE(pLight);
|
||||
}
|
||||
Safe_Delete(pairLight.second);
|
||||
} m_pLights[i].clear();
|
||||
} Safe_Delete_Array(m_pLights);
|
||||
for (size_t i = 0; i < m_iLevelNumber; i++)
|
||||
{
|
||||
for (auto& Light : m_Lights[i])
|
||||
{
|
||||
SAFE_RELEASE(Light);
|
||||
}
|
||||
|
||||
m_Lights[i].clear();
|
||||
|
||||
}
|
||||
|
||||
Safe_Delete_Array(m_Lights);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "PhysX_Manager.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameInstance.h"
|
||||
@@ -31,14 +31,13 @@ CPhysX_Manager::CPhysX_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pCont
|
||||
const PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody& RigidBody)
|
||||
{
|
||||
_matrix WorldMatrix = RigidBody.Get_TransformPtr()->Get_XMWorldMatrix();
|
||||
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix);
|
||||
|
||||
// PxRigidDynamic 씬의 동적 바디 인터페이스
|
||||
// PxRigidDynamic 씬의 동적 바디 인터페이스
|
||||
PSX::PxRigidDynamic* pActorDynamic = m_pPhysics->createRigidDynamic(pxWorldMatrix);
|
||||
pActorDynamic->userData = &RigidBody;
|
||||
|
||||
PSX::PxShape* pClone = nullptr;
|
||||
PSX::PxShape* pShape = nullptr;
|
||||
PSX::PxGeometryHolder geoHolder = {};
|
||||
|
||||
_float3 vVolume = RigidBody.Get_HalfGeometryInfo();
|
||||
@@ -46,29 +45,27 @@ const PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody& RigidBod
|
||||
switch (RigidBody.Get_Type()) {
|
||||
case ACTOR::BOX:
|
||||
geoHolder = PSX::PxBoxGeometry(PSX::PxVec3(vVolume.x, vVolume.y, vVolume.z));
|
||||
pClone = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.box(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
assert(nullptr != pClone);
|
||||
pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.box(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
break;
|
||||
case ACTOR::CAPSULE:
|
||||
geoHolder = PSX::PxCapsuleGeometry(vVolume.x, vVolume.y);
|
||||
pClone = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.capsule(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
assert(nullptr != pClone);
|
||||
pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.capsule(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
break;
|
||||
case ACTOR::SPHERE:
|
||||
geoHolder = PSX::PxCapsuleGeometry(vVolume.x);
|
||||
pClone = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.sphere(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
assert(nullptr != pClone);
|
||||
pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActorDynamic, geoHolder.sphere(), *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
break;
|
||||
default:
|
||||
assert(false); break;
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
assert(nullptr != pShape);
|
||||
|
||||
pClone->setFlags(RigidBody.Get_ShapeFlags());
|
||||
pClone->setContactOffset(RigidBody.Get_ContactOffset());
|
||||
pClone->setRestOffset(0.f);
|
||||
pShape->setFlags(RigidBody.Get_ShapeFlags());
|
||||
pShape->setContactOffset(RigidBody.Get_ContactOffset());
|
||||
pShape->setRestOffset(0.f);
|
||||
|
||||
|
||||
pActorDynamic->attachShape(*pClone);
|
||||
pActorDynamic->attachShape(*pShape);
|
||||
PSX::PxRigidBodyFlags pxRigidFlags = RigidBody.Get_RigidBodyFlags();
|
||||
pActorDynamic->setRigidBodyFlags(pxRigidFlags);
|
||||
|
||||
@@ -90,60 +87,70 @@ const PSX::PxRigidDynamic* CPhysX_Manager::Add_DynamicActor(CRigidBody& RigidBod
|
||||
const PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody& RigidBody)
|
||||
{
|
||||
_matrix WorldMatrix = RigidBody.Get_TransformPtr()->Get_XMWorldMatrix();
|
||||
|
||||
PSX::PxTransform pxWorldMatrix = XMWorldToPx_NoScale(WorldMatrix);
|
||||
|
||||
// PxRigidStatic 씬의 정적 바디 인터페이스
|
||||
PSX::PxTriangleMesh* pPxMesh = { nullptr };
|
||||
{
|
||||
auto iter = m_TriangleMeshes.find(RigidBody.Get_PxMeshKey());
|
||||
if (m_TriangleMeshes.end() == iter) {
|
||||
assert(false);
|
||||
return nullptr;
|
||||
}
|
||||
pPxMesh = iter->second;
|
||||
}
|
||||
_vector vPos, vRotq, vScale;
|
||||
XMMatrixDecompose(&vScale, &vRotq, &vPos, WorldMatrix);
|
||||
|
||||
vRotq = XMQuaternionNormalize(vRotq);
|
||||
|
||||
PSX::PxTransform out;
|
||||
XMStoreFloat3((_float3*)&out.p, vPos);
|
||||
XMStoreFloat4((_float4*)&out.q, vRotq);
|
||||
PSX::PxMeshScale meshScale(
|
||||
PSX::PxVec3(fabsf(vScale.m128_f32[0]), fabsf(vScale.m128_f32[1]), fabsf(vScale.m128_f32[2])),
|
||||
PSX::PxQuat(PSX::PxIdentity) // 스케일 축은 로컬 기준(보통 Identity가 가장 안전)
|
||||
);
|
||||
PSX::PxTriangleMeshGeometry* pPxMeshGeometry = new PSX::PxTriangleMeshGeometry(pPxMesh, meshScale);
|
||||
{
|
||||
pPxMeshGeometry->meshFlags |= PSX::PxMeshGeometryFlag::eDOUBLE_SIDED;
|
||||
PX_ASSERT(pPxMeshGeometry.isValid()); // 유효성 체크
|
||||
m_TriangleMeshGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry);
|
||||
}
|
||||
|
||||
// PxRigidStatic 씬의 정적 바디 인터페이스
|
||||
PSX::PxRigidStatic* pActor = m_pPhysics->createRigidStatic(pxWorldMatrix);
|
||||
PSX::PxShape* pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActor, *pPxMeshGeometry, *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
|
||||
pShape->setFlag(PSX::PxShapeFlag::eSCENE_QUERY_SHAPE, true);
|
||||
pShape->setFlag(PSX::PxShapeFlag::eSIMULATION_SHAPE, true);
|
||||
|
||||
pActor->userData = &RigidBody;
|
||||
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
PSX::PxTriangleMesh* pPxMesh = Find_TriangleMesh(RigidBody.Get_PxMeshKey());
|
||||
PSX::PxTriangleMeshGeometry* pPxMeshGeometry = { nullptr };
|
||||
|
||||
switch (RigidBody.Get_Type())
|
||||
{
|
||||
case ACTOR::PLANE:
|
||||
break;
|
||||
case ACTOR::TRIANGLEMESH:
|
||||
{ // SetUp Geometry
|
||||
_vector vPos, vRotq, vScale;
|
||||
XMMatrixDecompose(&vScale, &vRotq, &vPos, WorldMatrix);
|
||||
vRotq = XMQuaternionNormalize(vRotq);
|
||||
|
||||
PSX::PxTransform out;
|
||||
XMStoreFloat3((_float3*)&out.p, vPos);
|
||||
XMStoreFloat4((_float4*)&out.q, vRotq);
|
||||
PSX::PxMeshScale meshScale(
|
||||
PSX::PxVec3(fabsf(vScale.m128_f32[0]), fabsf(vScale.m128_f32[1]), fabsf(vScale.m128_f32[2])),
|
||||
PSX::PxQuat(PSX::PxIdentity) // 스케일 축은 로컬 기준
|
||||
);
|
||||
pPxMeshGeometry = new PSX::PxTriangleMeshGeometry(pPxMesh, meshScale);
|
||||
|
||||
// GeoFlag 중 더블사이드는 이제 지원 안함, 할거면 노말 뒤집어서 하라고 함
|
||||
// pPxMeshGeometry->meshFlags |= PSX::PxMeshGeometryFlag::eDOUBLE_SIDED;
|
||||
// 유효성 체크
|
||||
PX_ASSERT(pPxMeshGeometry.isValid());
|
||||
m_TriangleMeshGeometry.emplace(RigidBody.Get_PxMeshKey(), pPxMeshGeometry);
|
||||
}
|
||||
break;
|
||||
case ACTOR::HEIGHTFIELD:
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
pShape = PSX::PxRigidActorExt::createExclusiveShape(*pActor, *pPxMeshGeometry, *m_pMaterials[ENUM_CLASS(RigidBody.Get_MaterialType())]);
|
||||
|
||||
pShape->setFlags(RigidBody.Get_ShapeFlags());
|
||||
pShape->setContactOffset(RigidBody.Get_ContactOffset());
|
||||
pShape->setRestOffset(0.f);
|
||||
|
||||
m_RigidBodys.emplace_back(&RigidBody, pActor);
|
||||
m_pScene->addActor(*pActor);
|
||||
|
||||
return pActor;
|
||||
}
|
||||
|
||||
PSX::PxMaterial* CPhysX_Manager::Get_Material(const _float3* vMatInfo)
|
||||
PSX::PxMaterial* CPhysX_Manager::Create_Material(const _float3* vMatInfo)
|
||||
{
|
||||
PSX::PxMaterial* pPxMaterial = m_pPhysics->createMaterial(vMatInfo->x, vMatInfo->y, vMatInfo->z);
|
||||
return pPxMaterial;
|
||||
}
|
||||
|
||||
void CPhysX_Manager::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh) {
|
||||
void CPhysX_Manager::RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh)
|
||||
{
|
||||
m_TriangleMeshes.emplace(CMyTools::ToWstring(pName), pPxTriMesh);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CPhysX_Manager::ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix)
|
||||
@@ -233,8 +240,8 @@ HRESULT CPhysX_Manager::LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangle
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// 바이너리 로드에는 128B 정렬된 메모리 포인터를 넘겨야 함. InputData 그대로 넘기면 안됨
|
||||
// 심지어 바이너리로 불러온 블럭은 피직스의 모든 메시들을 릴리즈 한 뒤에 해제 해야 함
|
||||
// 바이너리 로드에는 128B 정렬된 메모리 포인터를 넘겨야 함. InputData 그대로 넘기면 안됨
|
||||
// 심지어 바이너리로 불러온 블럭은 피직스의 모든 메시들을 릴리즈 한 뒤에 해제 해야 함
|
||||
//_bool CPhysX_Manager::LoadTriMeshes_Binary(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes)
|
||||
//{
|
||||
// filesystem::path pathPhysX = pPath;
|
||||
@@ -312,8 +319,8 @@ void CPhysX_Manager::Update(_float fTimeDelta)
|
||||
_bool bResult = m_pScene->fetchResults(true);
|
||||
}
|
||||
{ // Post
|
||||
// Update_Dynamic_ActiveActors();
|
||||
Update_Dynamic_AllActors();
|
||||
Update_Dynamic_ActiveActors();
|
||||
//Update_Dynamic_AllActors();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,7 +434,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
}
|
||||
|
||||
|
||||
{ // 씬 세팅
|
||||
{ // 씬 세팅
|
||||
m_ToleranceScale.length = 1.f; // 1 meter
|
||||
m_ToleranceScale.speed = GRAVITY; //
|
||||
|
||||
@@ -440,7 +447,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
|
||||
sceneDesc.gravity = PSX::PxVec3(0.f, -GRAVITY, 0.f);
|
||||
|
||||
m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(2/*cpu 코어 갯수*/);
|
||||
m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(2/*cpu 코어 갯수*/);
|
||||
if (nullptr == m_pDispatcher) {
|
||||
assert(false);
|
||||
return E_FAIL;
|
||||
@@ -459,7 +466,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
m_pCCTManager->setOverlapRecoveryModule(false);
|
||||
}
|
||||
|
||||
// 디버그서버의 클라 세팅
|
||||
// 디버그서버의 클라 세팅
|
||||
PSX::PxPvdSceneClient* pPvdClient = m_pScene->getScenePvdClient();
|
||||
if (nullptr != pPvdClient) {
|
||||
pPvdClient->setScenePvdFlag(PSX::PxPvdSceneFlag::eTRANSMIT_CONSTRAINTS, true);
|
||||
@@ -469,7 +476,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
|
||||
// m_pScene->overlap();??????
|
||||
|
||||
#ifdef 기무리
|
||||
#ifdef 기무리
|
||||
m_pMaterials.reserve(ENUM_CLASS(PXMATERIAL::END));
|
||||
m_pMaterials.push_back(m_pPhysics->createMaterial(0.5f, 0.5f, 0.6f));
|
||||
PSX::PxRigidStatic* pGroundPlane = PxCreatePlane(*m_pPhysics, physx::PxPlane(0, 1, 0, 0), *m_pMaterials[ENUM_CLASS(PXMATERIAL::DEFAULT)]);
|
||||
@@ -491,7 +498,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endif // 기무리
|
||||
#endif // 기무리
|
||||
|
||||
|
||||
|
||||
@@ -500,7 +507,7 @@ HRESULT CPhysX_Manager::Initialize()
|
||||
|
||||
HRESULT CPhysX_Manager::Connect_DebugServer()
|
||||
{
|
||||
// 네트워크 디버거 전송객체 생성
|
||||
// 네트워크 디버거 전송객체 생성
|
||||
m_pTransport = PSX::PxDefaultPvdSocketTransportCreate("127.0.0.1", 5425, 10);
|
||||
if (nullptr == m_pTransport) {
|
||||
assert(false);
|
||||
|
||||
@@ -95,6 +95,9 @@ HRESULT CPrototype_Manager::Ready_StaticComponents()
|
||||
if (FAILED(Add_Prototype(g_iStaticLevel, CVIBuffer_Cube::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Prototype(g_iStaticLevel, CLight::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,14 @@ HRESULT CRenderTarget::Initialize(_uint iSizeX, _uint iSizeY, DXGI_FORMAT ePixel
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_vClearColor = vClearColor;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Ready_Debug();
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -69,40 +75,58 @@ void CRenderTarget::Copy_Resource(ID3D11Texture2D* pTexture2D)
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CRenderTarget::Ready_Debug(_float fX, _float fY, _float fSizeX, _float fSizeY)
|
||||
void CRenderTarget::Ready_Debug()
|
||||
{
|
||||
|
||||
XMStoreFloat4x4(&m_WorldMatrix, XMMatrixIdentity()); // 디버그 월드 메트릭스 초기화
|
||||
|
||||
_uint iNumViewports = { 1 };
|
||||
|
||||
D3D11_VIEWPORT Viewport{};
|
||||
m_pContext->RSGetViewports(&iNumViewports, &Viewport);
|
||||
|
||||
m_ptWindowSize.x = (LONG)Viewport.Width;
|
||||
m_ptWindowSize.y = (LONG)Viewport.Height;
|
||||
|
||||
XMStoreFloat4x4(&m_WorldMatrix, XMMatrixIdentity());
|
||||
m_WorldMatrix._11 = fSizeX;
|
||||
m_WorldMatrix._22 = fSizeY;
|
||||
m_WorldMatrix._41 = fX - Viewport.Width * 0.5f;
|
||||
m_WorldMatrix._42 = -fY + Viewport.Height * 0.5f;
|
||||
|
||||
return S_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
void CRenderTarget::Render_Debug(CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
void CRenderTarget::Describe_Entity(const _char* pName)
|
||||
{
|
||||
if (GUI::Checkbox(pName, &m_isDraw))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
_bool CRenderTarget::Render_Debug(CShader* pShader, CVIBuffer_Rect* pVIBuffer ,_float fX, _float fY, _float fSizeX, _float fSizeY)
|
||||
{
|
||||
|
||||
if (m_isDraw == false)
|
||||
return false;
|
||||
|
||||
m_WorldMatrix._11 = fSizeX;
|
||||
m_WorldMatrix._22 = fSizeY;
|
||||
m_WorldMatrix._41 = fX - m_ptWindowSize.x * 0.5f;
|
||||
m_WorldMatrix._42 = -fY + m_ptWindowSize.y * 0.5f;
|
||||
|
||||
|
||||
if (FAILED(pShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix)))
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (FAILED(pShader->Bind_SRV("g_Texture", m_pSRV)))
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (FAILED(pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::DEBUG))))
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (FAILED(pVIBuffer->Bind_Resources()))
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (FAILED(pVIBuffer->Render()))
|
||||
return;
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -149,31 +149,53 @@ HRESULT CRenderTarget_Manager::Bind_RenderTarget(const _wstring& strTargetTag, C
|
||||
return pRenderTarget->Bind_ShaderResource(pShader, pConstantName);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
HRESULT CRenderTarget_Manager::Ready_RenderTarget_Debug(const _wstring& strTargetTag, _float fX, _float fY, _float fSizeX, _float fSizeY)
|
||||
|
||||
HRESULT CRenderTarget_Manager::Render_RenderTarget_Debug(CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return pRenderTarget->Ready_Debug(fX, fY, fSizeX, fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Render_RenderTarget_Debug(const _wstring& strMRTTag, CShader* pShader, CVIBuffer_Rect* pVIBuffer)
|
||||
{
|
||||
list<CRenderTarget*>* pMRTList = Find_MRT(strMRTTag);
|
||||
_float fX = m_iSizeX * 0.5f;
|
||||
_float fY = m_iSizeY * 0.5f;
|
||||
|
||||
if (nullptr == pMRTList) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (auto& pRenderTarget : *pMRTList)
|
||||
for (auto& pRenderTarget : m_RenderTargets)
|
||||
{
|
||||
pRenderTarget->Render_Debug(pShader, pVIBuffer);
|
||||
if (pRenderTarget.second->Render_Debug(pShader, pVIBuffer, fX, fY, (_float)m_iSizeX, (_float)m_iSizeY) == false)
|
||||
continue;
|
||||
|
||||
fX += m_iSizeX;
|
||||
|
||||
if (fX > 1920.f - m_iSizeX * 0.5f)
|
||||
{
|
||||
fX = m_iSizeX * 0.5f;
|
||||
fY += m_iSizeY;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRenderTarget_Manager::RenderTarget_Debuger()
|
||||
{
|
||||
GUI::Begin("RenderTarget Debuger");
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::Text("Active Btn -> F10");
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::DragInt("Target Size X" , &m_iSizeX);
|
||||
GUI::DragInt("Target Size Y", &m_iSizeY);
|
||||
GUI::PopItemWidth();
|
||||
|
||||
for (auto& pTarget : m_RenderTargets)
|
||||
{
|
||||
pTarget.second->Describe_Entity(CMyTools::ToString(pTarget.first).c_str());
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
CRenderTarget* CRenderTarget_Manager::Find_RenderTarget(const _wstring& strRenderTargetKey)
|
||||
|
||||
@@ -117,6 +117,8 @@ void CRenderer::Render()
|
||||
Render_UI();
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->RenderTarget_Debuger();
|
||||
|
||||
if(m_pGameInstance->Key_Pressing(DIK_F10))
|
||||
Render_Debug();
|
||||
#endif
|
||||
@@ -229,7 +231,7 @@ void CRenderer::Render_LightAcc()
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
|
||||
if (FAILED(m_pGameInstance->Render_Lights(m_pShader, m_pVIBuffer))) {
|
||||
if (FAILED(m_pGameInstance->Render_Lights(m_pGameInstance->Get_CurrentLevelID(), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -523,27 +525,10 @@ void CRenderer::Render_Debug()
|
||||
}
|
||||
|
||||
/* 렌더타겟을 디버그로 직교투영을 통해 그려라. */
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_GameObjects"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_LightAcc"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_Shadow"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_PreShadow"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_Blur"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_Blur_X"), m_pShader, m_pVIBuffer))){
|
||||
return;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_Color"), m_pShader, m_pVIBuffer))) {
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -701,45 +686,6 @@ HRESULT CRenderer::Initialize()
|
||||
XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(Viewport.Width, Viewport.Height, 0.f, 1.f));
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Diffuse"), 75.f, 75.f, 150.0f, 150.0f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Normal"), 75.f, 225.f, 150.0f, 150.0f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Shade"), 225.f, 75.f, 150.0f, 150.0f))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Specular"), 225.f, 225.f, 150.0f, 150.0f))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Color"),75.f , 1080 - 75.f, 150.f, 150.f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Shadow"), Viewport.Width - 150.0f, 150.0f, 300.f, 300.f))) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_PreShadow"), Viewport.Width - 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
|
||||
// return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_Weight"), 75.f, 75.f, 150.0f, 150.0f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur"), 75.f, 225.f, 150.0f, 150.0f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_X"), 225.f, 75.f, 150.0f, 150.0f))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,12 @@ CShader::CShader(const CShader& rhs)
|
||||
, m_pEffect{ rhs.m_pEffect }
|
||||
, m_iNumPasses{ rhs.m_iNumPasses }
|
||||
, m_InputLayouts{ rhs.m_InputLayouts }
|
||||
|
||||
#ifdef _DEBUG
|
||||
, m_strShaderPath { rhs.m_strShaderPath }
|
||||
, m_pElements{ rhs.m_pElements }
|
||||
, m_iNumElements{ rhs.m_iNumElements }
|
||||
#endif
|
||||
{
|
||||
Safe_AddRef(m_pEffect);
|
||||
|
||||
@@ -21,52 +27,18 @@ CShader::CShader(const CShader& rhs)
|
||||
|
||||
HRESULT CShader::Initialize_Prototype(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements)
|
||||
{
|
||||
_uint iHlslFlag = {};
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
iHlslFlag = D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION;
|
||||
#else
|
||||
iHlslFlag = D3DCOMPILE_OPTIMIZATION_LEVEL1;
|
||||
m_strShaderPath = pShaderFilePath;
|
||||
m_pElements = pElements;
|
||||
m_iNumElements = iNumElements;
|
||||
#endif
|
||||
|
||||
/*ID3DBlob* pBlob;*/
|
||||
|
||||
if (FAILED(D3DX11CompileEffectFromFile(pShaderFilePath, nullptr, D3D_COMPILE_STANDARD_FILE_INCLUDE, iHlslFlag, 0, m_pDevice, &m_pEffect, nullptr)))
|
||||
if (FAILED(CreateShader(pShaderFilePath, pElements, iNumElements)))
|
||||
return E_FAIL;
|
||||
|
||||
ID3DX11EffectTechnique* pTechnique = m_pEffect->GetTechniqueByIndex(0);
|
||||
if (nullptr == pTechnique)
|
||||
return E_FAIL;
|
||||
|
||||
D3DX11_TECHNIQUE_DESC TechniqueDesc{};
|
||||
|
||||
if (FAILED(pTechnique->GetDesc(&TechniqueDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iNumPasses = TechniqueDesc.Passes;
|
||||
|
||||
for (_uint i = 0; i < m_iNumPasses; i++)
|
||||
{
|
||||
ID3D11InputLayout* pInputLayout = { nullptr };
|
||||
|
||||
ID3DX11EffectPass* pPass = pTechnique->GetPassByIndex(i);
|
||||
if (nullptr == pPass)
|
||||
return E_FAIL;
|
||||
|
||||
D3DX11_PASS_DESC PassDesc{};
|
||||
if (FAILED(pPass->GetDesc(&PassDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pDevice->CreateInputLayout(
|
||||
pElements,
|
||||
iNumElements,
|
||||
PassDesc.pIAInputSignature/*쉐이더에서 받아줄수 있는 정점의 정보*/,
|
||||
PassDesc.IAInputSignatureSize/*쉐이더에서 받아줄수 있는 정점의 멤버변수갯수*/,
|
||||
&pInputLayout)))
|
||||
return E_FAIL;
|
||||
|
||||
m_InputLayouts.push_back(pInputLayout);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -139,6 +111,81 @@ HRESULT CShader::Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView*
|
||||
return pSRVariable->SetResourceArray(ppSRV, 0, iNumSRVs);
|
||||
}
|
||||
|
||||
HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements)
|
||||
{
|
||||
|
||||
_uint iHlslFlag = {};
|
||||
|
||||
#ifdef _DEBUG
|
||||
iHlslFlag = D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION;
|
||||
#else
|
||||
iHlslFlag = D3DCOMPILE_OPTIMIZATION_LEVEL1;
|
||||
#endif
|
||||
|
||||
/*ID3DBlob* pBlob;*/
|
||||
|
||||
if (FAILED(D3DX11CompileEffectFromFile(pShaderFilePath, nullptr, D3D_COMPILE_STANDARD_FILE_INCLUDE, iHlslFlag, 0, m_pDevice, &m_pEffect, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
ID3DX11EffectTechnique* pTechnique = m_pEffect->GetTechniqueByIndex(0);
|
||||
if (nullptr == pTechnique)
|
||||
return E_FAIL;
|
||||
|
||||
D3DX11_TECHNIQUE_DESC TechniqueDesc{};
|
||||
|
||||
if (FAILED(pTechnique->GetDesc(&TechniqueDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
m_iNumPasses = TechniqueDesc.Passes;
|
||||
|
||||
for (_uint i = 0; i < m_iNumPasses; i++)
|
||||
{
|
||||
ID3D11InputLayout* pInputLayout = { nullptr };
|
||||
|
||||
ID3DX11EffectPass* pPass = pTechnique->GetPassByIndex(i);
|
||||
if (nullptr == pPass)
|
||||
return E_FAIL;
|
||||
|
||||
D3DX11_PASS_DESC PassDesc{};
|
||||
if (FAILED(pPass->GetDesc(&PassDesc)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pDevice->CreateInputLayout(
|
||||
pElements,
|
||||
iNumElements,
|
||||
PassDesc.pIAInputSignature/*쉐이더에서 받아줄수 있는 정점의 정보*/,
|
||||
PassDesc.IAInputSignatureSize/*쉐이더에서 받아줄수 있는 정점의 멤버변수갯수*/,
|
||||
&pInputLayout)))
|
||||
return E_FAIL;
|
||||
|
||||
m_InputLayouts.push_back(pInputLayout);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CShader::Shader_Refresh()
|
||||
{
|
||||
// 내 인풋 레이아웃 이펙트 소멸시키고
|
||||
Safe_Release(m_pEffect);
|
||||
|
||||
for (auto& pInputLayout : m_InputLayouts)
|
||||
Safe_Release(pInputLayout);
|
||||
|
||||
m_InputLayouts.clear();
|
||||
|
||||
|
||||
//그 경로로 재 생성한다.
|
||||
if (FAILED(CreateShader(m_strShaderPath.c_str(), m_pElements, m_iNumElements)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif //
|
||||
|
||||
|
||||
HRESULT CShader::Begin(_uint iPassIndex)
|
||||
{
|
||||
if (iPassIndex >= m_iNumPasses)
|
||||
@@ -193,4 +240,17 @@ void CShader::Free()
|
||||
|
||||
void CShader::Describe_Entity()
|
||||
{
|
||||
|
||||
if(GUI::TreeNode("SHADER"))
|
||||
{
|
||||
if (GUI::Button("Shader Refresh"))
|
||||
{
|
||||
|
||||
Shader_Refresh();
|
||||
|
||||
}
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,12 @@ HRESULT CUIObject::Initialize(void* pArg)
|
||||
|
||||
m_bVisible = true;
|
||||
|
||||
m_vNine_Slice = XMVectorSet(-m_fSizeX * 0.5f, m_fSizeX * 0.5f, -m_fSizeY * 0.5f, m_fSizeY * 0.5f);
|
||||
m_fLeft = 0.f;
|
||||
m_fRight = m_fSizeX;
|
||||
m_fTop = 0.f;
|
||||
m_fBottom = m_fSizeY;
|
||||
|
||||
m_vNine_Slice = _float4(m_fLeft, m_fRight, m_fTop, m_fBottom);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -98,7 +103,7 @@ void CUIObject::Update(_float fTimeDelta)
|
||||
m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f);
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f,-m_fY + m_fWinSizeY * 0.5f,0.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f));
|
||||
|
||||
m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f);
|
||||
|
||||
@@ -275,22 +280,42 @@ _float2 CUIObject::Get_UV()
|
||||
|
||||
void CUIObject::Nine_Slice_Left(_float X)
|
||||
{
|
||||
XMVectorSetX(m_vNine_Slice, X);
|
||||
m_fLeft = -m_fSizeX * 0.5f + X;
|
||||
}
|
||||
|
||||
void CUIObject::Nine_Slice_Right(_float Y)
|
||||
{
|
||||
XMVectorSetY(m_vNine_Slice, Y);
|
||||
m_fRight = m_fSizeX * 0.5f - Y;
|
||||
}
|
||||
|
||||
void CUIObject::Nine_Slice_Top(_float Z)
|
||||
{
|
||||
XMVectorSetZ(m_vNine_Slice, Z);
|
||||
m_fTop = -m_fSizeY * 0.5f + Z;
|
||||
}
|
||||
|
||||
void CUIObject::Nine_Slice_Bottom(_float W)
|
||||
{
|
||||
XMVectorSetW(m_vNine_Slice, W);
|
||||
m_fBottom = m_fSizeY * 0.5f - W;
|
||||
}
|
||||
|
||||
_float CUIObject::Get_Nine_Slice_Left()
|
||||
{
|
||||
return m_fLeft;
|
||||
}
|
||||
|
||||
_float CUIObject::Get_Nine_Slice_Right()
|
||||
{
|
||||
return m_fRight;
|
||||
}
|
||||
|
||||
_float CUIObject::Get_Nine_Slice_Top()
|
||||
{
|
||||
return m_fTop;
|
||||
}
|
||||
|
||||
_float CUIObject::Get_Nine_Slice_Bottom()
|
||||
{
|
||||
return m_fBottom;
|
||||
}
|
||||
|
||||
_float2 CUIObject::Get_Origin_Position()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -9,10 +9,11 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
public:
|
||||
typedef struct tagCameraDesc : public CTransform::TRANSFORM_DESC
|
||||
{
|
||||
_float fFovy{}, fNear{}, fFar{};
|
||||
_uint iPriority = { UINT_MAX };
|
||||
CGameObject* pFollowTarget = { nullptr };
|
||||
CGameObject* pLookTarget = { nullptr };
|
||||
_float fFovy{}, fNear{}, fFar{};
|
||||
_uint iPriority = { UINT_MAX };
|
||||
const _wchar* pCameraKey = { };
|
||||
CGameObject* pFollowTarget = { nullptr };
|
||||
CGameObject* pLookTarget = { nullptr };
|
||||
}CAMERA_DESC;
|
||||
|
||||
protected:
|
||||
@@ -48,6 +49,7 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
|
||||
_bool m_bActive = { false };
|
||||
|
||||
const _wchar* m_pCameraKey = { nullptr };
|
||||
CGameObject* m_pFollowTarget = { nullptr };
|
||||
CGameObject* m_pLookTarget = { nullptr };
|
||||
|
||||
@@ -65,4 +67,4 @@ class ENGINE_DLL CCamera abstract : public CGameObject
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -17,8 +17,9 @@ class CCamera_Manager final : public CBase
|
||||
HRESULT Bind_Camera(_uint iLevel, const _wstring& wstrCameraKey, _bool bIgnorePriority);
|
||||
HRESULT IsBinded_Camera(const _wstring& wstrCameraKey);
|
||||
|
||||
const _float* Get_CurrentCameraFar();
|
||||
|
||||
void Force_CamPosition(_fvector vPos);
|
||||
const _float* Get_CurrentCameraFar();
|
||||
|
||||
private:
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
@@ -42,4 +43,4 @@ class CCamera_Manager final : public CBase
|
||||
virtual void Free()override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -14,7 +14,7 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
{
|
||||
_float fRadius;
|
||||
_float fHeight;
|
||||
PSX::PxCapsuleClimbingMode::Enum eClimbingMode; // 기본 (eEASY, stepOffset 값이 무제한), (eCONSTRAINED, stepOffset 값이 제대로 먹음)
|
||||
PSX::PxCapsuleClimbingMode::Enum eClimbingMode; // 기본 (eEASY, stepOffset 값이 무제한), (eCONSTRAINED, stepOffset 값이 제대로 먹음)
|
||||
};
|
||||
typedef struct tagCharacter_ControllerDesc
|
||||
{
|
||||
@@ -22,18 +22,18 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
ACTOR eBodyType = { ACTOR::END };
|
||||
_float fContactOffset = { 0.f };
|
||||
_float3 fMaterial = { 0.5f, 0.5f, 0.6f };
|
||||
_bool bAutoStepping = { false }; // 계단 높이 타게 할건지 // 박스 콜라이더는 생각한대로 되는데 캡슐은 바닥의 구체 때문에 예상보다 더 높은 곳까지 오를 수 있음
|
||||
_float fStepOffset = { 0.05f }; // 허용가능한 계단 높이, 작게 유지하는게 좋음
|
||||
_bool bAutoStepping = { false }; // 계단 높이 타게 할건지 // 박스 콜라이더는 생각한대로 되는데 캡슐은 바닥의 구체 때문에 예상보다 더 높은 곳까지 오를 수 있음
|
||||
_float fStepOffset = { 0.05f }; // 허용가능한 계단 높이, 작게 유지하는게 좋음
|
||||
|
||||
function<void()> funcHitCallback = { nullptr };
|
||||
function<void()> funcBehaviorCallback = { nullptr };
|
||||
|
||||
// 타고 올라갈 수 없는 경사면의 각도를 정의함. 0.f 면 비활성화 됨
|
||||
// _float fSlopeLimit = { 코사인각도 };
|
||||
// 타고 올라갈 수 없는 경사면의 각도를 정의함. 0.f 면 비활성화 됨
|
||||
// _float fSlopeLimit = { 코사인각도 };
|
||||
|
||||
union
|
||||
{
|
||||
_float3 vBoxSize; // 박스는 AABB임
|
||||
_float3 vBoxSize; // 박스는 AABB임
|
||||
CapsuleInfo tCapsuleInfo;
|
||||
};
|
||||
}Character_Controller_DESC;
|
||||
@@ -47,18 +47,18 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
virtual HRESULT Render() override;
|
||||
#endif
|
||||
|
||||
_float Get_ContactOffset() const { return m_pController->getContactOffset(); }
|
||||
void Set_ContactOffset(_float fValue) const { return m_pController->setContactOffset((PSX::PxF32)fValue); }
|
||||
_float Get_ContactOffset() const { return m_pController->getContactOffset(); }
|
||||
void Set_ContactOffset(_float fValue) const { return m_pController->setContactOffset((PSX::PxF32)fValue); }
|
||||
|
||||
void Move(_float fTimeDelta); // 이동
|
||||
void Set_Position(_fvector vNewPos); // 순간이동
|
||||
_vector Get_Position();
|
||||
_float3 Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 더 아래에 위치한다는 뜻 )
|
||||
void Move(_float fTimeDelta); // 이동
|
||||
void Set_Position(_fvector vNewPos); // 순간이동
|
||||
_vector Get_Position();
|
||||
_float3 Get_FootPosition(); // ContactOffset이 고려된 발바닥 위치( 실제보다 더 아래에 위치한다는 뜻 )
|
||||
|
||||
|
||||
void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임
|
||||
void Modify_Volume(_float3 fVolume);
|
||||
_float3 Get_Volume();
|
||||
void Resize_Volume(_float fHeight); // 높이를 수정하고 바닥에 붙임
|
||||
void Modify_Volume(_float3 fVolume);
|
||||
_float3 Get_Volume();
|
||||
|
||||
private:
|
||||
ACTOR m_eBodyType = { ACTOR::END };
|
||||
@@ -89,4 +89,4 @@ class ENGINE_DLL CCharacter_Controller final :
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -21,7 +21,14 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
|
||||
public:
|
||||
virtual void Visible(_bool bVisible) override;
|
||||
virtual _bool Chack_Visible() override;
|
||||
|
||||
virtual void Nine_Slice_Left(_float X) override;
|
||||
virtual void Nine_Slice_Right(_float Y) override;
|
||||
virtual void Nine_Slice_Top(_float Z) override;
|
||||
virtual void Nine_Slice_Bottom(_float W) override;
|
||||
virtual _float Get_Nine_Slice_Left() override;
|
||||
virtual _float Get_Nine_Slice_Right() override;
|
||||
virtual _float Get_Nine_Slice_Top() override;
|
||||
virtual _float Get_Nine_Slice_Bottom() override;
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype();
|
||||
|
||||
@@ -174,4 +174,4 @@ NS_END
|
||||
// // PhysX Particle들이 닿는 순간 그 파티클을 '흡수'해서 제거함
|
||||
// // (default = off)
|
||||
// [ePARTICLE_DRAIN],
|
||||
//};
|
||||
//};
|
||||
|
||||
@@ -38,15 +38,18 @@ struct LERPDESC {
|
||||
|
||||
typedef struct tagLightDesc
|
||||
{
|
||||
LIGHT eType = {};
|
||||
_float4 vDiffuse = {};
|
||||
_float4 vAmbient = {};
|
||||
_float4 vSpecular = {};
|
||||
LIGHT eType = {};
|
||||
_float4 vDiffuse = {};
|
||||
_float4 vAmbient = {};
|
||||
_float4 vSpecular = {};
|
||||
|
||||
_float4 vDirection = {};
|
||||
_float4 vPosition = {};
|
||||
_float fRange = {};
|
||||
_float2 vSpotAngles = {};
|
||||
const XMFLOAT4* pDirection = nullptr;
|
||||
const XMFLOAT4* pPosition = nullptr;
|
||||
|
||||
_float fRange = {};
|
||||
_float2 vSpotAngles = {};
|
||||
|
||||
_uint iLevel = {};
|
||||
}LIGHT_DESC;
|
||||
|
||||
typedef struct tagShadowLight
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Prototype_Manager.h"
|
||||
#include "GameObject_Manager.h"
|
||||
|
||||
@@ -132,9 +132,10 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
const _vector Get_CamXMPosition();
|
||||
#pragma endregion
|
||||
#pragma region LIGHT_MANAGER
|
||||
HRESULT On_Light(_uint iLevel, const _wstring& wstrLightKey, const LIGHT_DESC& LightDesc, class CLight** ppOut);
|
||||
HRESULT Off_Light(_uint iLevel, const _wstring& wstrLightKey);
|
||||
HRESULT Render_Lights(class CShader* pShader, class CVIBuffer* pVIBuffer);
|
||||
void Add_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
void Delete_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
const LIGHT_DESC* Get_Light_Info(_uint _iCurrentLevel, _uint _iLightIndex);
|
||||
HRESULT Render_Lights(_uint _iCurrentLevel, class CShader* pShader, class CVIBuffer* pVIBuffer);
|
||||
#pragma endregion
|
||||
#pragma region COLLIDER_MANAGER
|
||||
HRESULT Add_ColliderGroup(_uint iColliderGroup, class CCollider* pBounding);
|
||||
@@ -152,8 +153,8 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
#ifdef _DEBUG
|
||||
HRESULT Ready_RenderTarget_Debug(const _wstring& strTargetTag, _float fX, _float fY, _float fSizeX, _float fSizeY);
|
||||
HRESULT Render_RenderTarget_Debug(const _wstring& strMRTTag, class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
void RenderTarget_Debuger();
|
||||
HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
#endif // _DEBUG
|
||||
#pragma endregion
|
||||
#pragma region CAMERA_MANAGER
|
||||
@@ -163,6 +164,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Bind_Camera(_uint iLevel, const _wstring& strCameraKey, _bool bIgnorePriority);
|
||||
HRESULT IsBinded_Camera(const _wstring& strCameraKey);
|
||||
const _float* Get_CurrentCameraFar();
|
||||
void Force_CamPosition(_fvector vPos);
|
||||
#pragma endregion
|
||||
|
||||
#pragma region SHADOW
|
||||
@@ -191,7 +193,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
|
||||
HRESULT ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix = XMMatrixIdentity());
|
||||
HRESULT SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
HRESULT LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes); // 모델 불러왔던 경로에 그대로 있음
|
||||
HRESULT LoadTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes); // 모델 불러왔던 경로에 그대로 있음
|
||||
#pragma endregion
|
||||
|
||||
|
||||
@@ -254,4 +256,4 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -34,6 +34,12 @@ class ENGINE_DLL CGameObject_Manager final : public CBase
|
||||
static CGameObject_Manager* Create(_uint iNumLevels);
|
||||
virtual void Free() override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -7,7 +7,7 @@ class ENGINE_DLL CLayer final : public CBase
|
||||
{
|
||||
private:
|
||||
CLayer();
|
||||
virtual ~CLayer();
|
||||
virtual ~CLayer() = default;
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
@@ -40,8 +40,13 @@ class ENGINE_DLL CLayer final : public CBase
|
||||
HRESULT Initialize();
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
static CLayer* Create();
|
||||
virtual void Free() override;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#pragma once
|
||||
#include "Base.h"
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
|
||||
|
||||
class ENGINE_DLL CLight final : public CBase
|
||||
class ENGINE_DLL CLight final : public CComponent
|
||||
{
|
||||
private:
|
||||
CLight();
|
||||
CLight(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CLight(const CLight& rhs);
|
||||
virtual ~CLight() = default;
|
||||
|
||||
public:
|
||||
@@ -15,15 +16,21 @@ class ENGINE_DLL CLight final : public CBase
|
||||
_bool operator==(const Engine::LIGHT_DESC& rhs) const;
|
||||
|
||||
public:
|
||||
HRESULT Replace_LightTo(_fvector vPosition);
|
||||
HRESULT Initialize(const LIGHT_DESC& LightDesc);
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
public:
|
||||
const LIGHT_DESC* Get_LightDesc() { return &m_LightDesc; }
|
||||
public:
|
||||
HRESULT Render(class CShader* pShader, class CVIBuffer* pVIBuffer) const;
|
||||
|
||||
private:
|
||||
LIGHT_DESC m_LightDesc{};
|
||||
LIGHT_DESC m_LightDesc = {};
|
||||
public:
|
||||
static CLight* Create(const LIGHT_DESC& LightDesc);
|
||||
static CLight* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CComponent* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -10,19 +10,22 @@ class CLight_Manager final : public CBase
|
||||
CLight_Manager();
|
||||
virtual ~CLight_Manager() = default;
|
||||
|
||||
|
||||
public:
|
||||
HRESULT On_Light(_uint iLevel, const _wstring& wstrLightKey, const LIGHT_DESC& LightDesc, class CLight** ppOut);
|
||||
HRESULT Off_Light(_uint iLevel, const _wstring& wstrLightKey);
|
||||
HRESULT Render_Lights(class CShader* pShader, class CVIBuffer* pVIBuffer);
|
||||
HRESULT Change_Level(_uint iLevel);
|
||||
void Add_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
void Delete_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
void Light_Clear(_uint _iCurrentLevel);
|
||||
const LIGHT_DESC* Get_Light_Info(_uint _iCurrentLevel ,_uint _iLightIndex);
|
||||
|
||||
public:
|
||||
HRESULT Render_Lights(_uint _iCurrentLevel, class CShader* pShader, class CVIBuffer* pVIBuffer);
|
||||
|
||||
private:
|
||||
map<_wstring, list<class CLight*>*>* m_pLights = { nullptr };
|
||||
_uint m_iNumLevel = {};
|
||||
private:
|
||||
list<class CLight*>* Find_Lights(_uint iLevel, const _wstring& wstrLightKey);
|
||||
HRESULT Initialize(_uint iNumLevel);
|
||||
HRESULT Initialize(_uint iNumLevels);
|
||||
|
||||
private:
|
||||
_uint m_iLevelNumber = {};
|
||||
list<class CLight*>* m_Lights = { nullptr };
|
||||
public:
|
||||
static CLight_Manager* Create(_uint iNumLevel);
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
@@ -28,7 +28,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
_bool IsFinishedAnim() const { return m_bIsFinishedAnim; }
|
||||
_bool IsFinishedLerp() const { return m_bIsFinishedLerp; }
|
||||
_float Get_AnimProgressRatio();
|
||||
_int Get_AnimProgressPostion(const char* pAnimChannelName);
|
||||
_int Get_AnimProgressPostion(const _char* pAnimChannelName);
|
||||
_float Get_AnimEstimatedDuration();
|
||||
void Set_AnimProgressPostion(const _char* pChannelName, _uint iPosition);
|
||||
void Set_AnimPauseState(_bool bValue);// 애님을 현재상태로 정지
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -17,14 +17,14 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
public:
|
||||
/* dev-treadmill.tistory.com/155 */
|
||||
// HRESULT Update_RegionOfInterest(); ( 충돌 컬링, 필터링도 검색해야함 )
|
||||
// Aggregate ( 충돌 그룹, 이 그룹끼리는 서로 충돌검사를 하지 않음, 지형, 레그돌 등 )
|
||||
// HRESULT Update_RegionOfInterest(); ( 충돌 컬링, 필터링도 검색해야함 )
|
||||
// Aggregate ( 충돌 그룹, 이 그룹끼리는 서로 충돌검사를 하지 않음, 지형, 레그돌 등 )
|
||||
|
||||
const PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody& RigidBody);
|
||||
const PSX::PxRigidStatic* Add_StaticActor(CRigidBody& RigidBody);
|
||||
|
||||
void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh);
|
||||
PSX::PxMaterial* Get_Material(const _float3* vMatInfo);
|
||||
PSX::PxMaterial* Create_Material(const _float3* vMatInfo);
|
||||
|
||||
HRESULT ConvertToTriMeshes(vector<class CMesh*>& Meshes, vector<class PSX::PxTriangleMesh*>& pxTriMeshes, _fmatrix WorldMatrix);
|
||||
HRESULT SaveTriMeshes(const _char* pPath, vector<PSX::PxTriangleMesh*>& TriMeshes);
|
||||
@@ -57,16 +57,16 @@ class CPhysX_Manager final : public CBase
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pContext = { nullptr };
|
||||
|
||||
PSX::PxDefaultAllocator m_AllocatorCallBack = { }; // 피직스 동적할당자
|
||||
PSX::PxDefaultErrorCallback m_ErrorCallBack = { }; // 피직스 오류처리자
|
||||
PSX::PxDefaultCpuDispatcher* m_pDispatcher = { nullptr }; // 피직스 CPU디스패쳐 ( 현재 피직스는 CPU only )
|
||||
PSX::PxTolerancesScale m_ToleranceScale = PSX::PxTolerancesScale(); // 피직스 공차의 집합 ( 기본 단위 집합 )
|
||||
PSX::PxFoundation* m_pFoundation = { nullptr }; // 피직스 초기화 종료 담당자
|
||||
PSX::PxPhysics* m_pPhysics = { nullptr }; // 피직스 객체의 생성, 초기화, 조작 담당 (싱글톤)
|
||||
PSX::PxDefaultAllocator m_AllocatorCallBack = { }; // 피직스 동적할당자
|
||||
PSX::PxDefaultErrorCallback m_ErrorCallBack = { }; // 피직스 오류처리자
|
||||
PSX::PxDefaultCpuDispatcher* m_pDispatcher = { nullptr }; // 피직스 CPU디스패쳐 ( 현재 피직스는 CPU only )
|
||||
PSX::PxTolerancesScale m_ToleranceScale = PSX::PxTolerancesScale(); // 피직스 공차의 집합 ( 기본 단위 집합 )
|
||||
PSX::PxFoundation* m_pFoundation = { nullptr }; // 피직스 초기화 종료 담당자
|
||||
PSX::PxPhysics* m_pPhysics = { nullptr }; // 피직스 객체의 생성, 초기화, 조작 담당 (싱글톤)
|
||||
|
||||
PSX::PxScene* m_pScene = { nullptr }; // 피직스 시뮬레이션의 공간
|
||||
PSX::PxControllerManager* m_pCCTManager = { nullptr }; // 피직스 캐릭터 컨트롤러를 전부 추적하고 매니징함
|
||||
PSX::PxPvd* m_pPvd = { nullptr }; // 피직스 시뮬레이션 디버깅을 위한 도구
|
||||
PSX::PxScene* m_pScene = { nullptr }; // 피직스 시뮬레이션의 공간
|
||||
PSX::PxControllerManager* m_pCCTManager = { nullptr }; // 피직스 캐릭터 컨트롤러를 전부 추적하고 매니징함
|
||||
PSX::PxPvd* m_pPvd = { nullptr }; // 피직스 시뮬레이션 디버깅을 위한 도구
|
||||
PSX::PxCookingParams* m_pCookingParam = { nullptr };
|
||||
PSX::PxPvdTransport* m_pTransport = { nullptr };
|
||||
|
||||
@@ -90,4 +90,4 @@ class CPhysX_Manager final : public CBase
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Model.h"
|
||||
#include "Instance_Model.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "Light.h"
|
||||
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
|
||||
@@ -21,9 +21,9 @@ class CRenderTarget final : public CBase
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
HRESULT Ready_Debug(_float fX, _float fY, _float fSizeX, _float fSizeY);
|
||||
void Render_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
|
||||
_bool Render_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer, _float fX, _float fY, _float fSizeX, _float fSizeY);
|
||||
void Ready_Debug();
|
||||
void Describe_Entity(const _char* pName);
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -38,6 +38,8 @@ class CRenderTarget final : public CBase
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_float4x4 m_WorldMatrix = {};
|
||||
_point m_ptWindowSize = {};
|
||||
_bool m_isDraw = { false };
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
@@ -20,8 +20,14 @@ class CRenderTarget_Manager final : public CBase
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
HRESULT Ready_RenderTarget_Debug(const _wstring& strTargetTag, _float fX, _float fY, _float fSizeX, _float fSizeY);
|
||||
HRESULT Render_RenderTarget_Debug(const _wstring& strMRTTag, class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
void RenderTarget_Debuger();
|
||||
#endif // _DEBUG
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_int m_iSizeX = { 100 };
|
||||
_int m_iSizeY = { 100 };
|
||||
#endif // _DEBUG
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(PSX)
|
||||
@@ -13,17 +13,17 @@ class CMesh;
|
||||
class ENGINE_DLL CRigidBody final : public CComponent
|
||||
{
|
||||
public: // MORE INFO ON ENGINE_ENUM
|
||||
typedef struct tagRigidBody_PrototypeDesc // 다 채우세요 NONE 빼고, 목적에 안맞는거 빼고
|
||||
typedef struct tagRigidBody_PrototypeDesc // 다 채우세요 NONE 빼고, 목적에 안맞는거 빼고
|
||||
{
|
||||
ACTOR eType;
|
||||
PSX::PxRigidBodyFlags ePxRigidBodyFlags = { /* NONE */};
|
||||
PSX::PxShapeFlags ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
PXMATERIAL ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
_float3 vMatInfo = { 0.5f, 0.5f, 0.6f }; // 피직스 객체의 속성 등
|
||||
_float fContactOffset = { 0.05f }; // 접촉 유격 오프셋
|
||||
_float3 vMatInfo = { 0.5f, 0.5f, 0.6f }; // 피직스 객체의 속성 등
|
||||
_float fContactOffset = { 0.05f }; // 접촉 유격 오프셋
|
||||
#pragma region DYNAMIC
|
||||
_float3 vhalfGeometryInfo; // 박스는 vSize, 캡슐은 radius, height로 씀
|
||||
_float fDensity = { 1000.f }; // 밀도, 실제 무게는 부피에 따라 달라짐
|
||||
_float3 vhalfGeometryInfo; // 박스는 vSize, 캡슐은 radius, height로 씀
|
||||
_float fDensity = { 1000.f }; // 밀도, 실제 무게는 부피에 따라 달라짐
|
||||
#pragma endregion
|
||||
#pragma region STATIC
|
||||
#pragma endregion
|
||||
@@ -63,7 +63,7 @@ class ENGINE_DLL CRigidBody final : public CComponent
|
||||
PSX::PxRigidBodyFlags m_ePxRigidBodyFlags = {};
|
||||
PXMATERIAL m_eMatType = { PXMATERIAL::END };
|
||||
_float m_fContactOffset = { 0.05f };
|
||||
const PSX::PxActor* m_pRigidBody = { nullptr }; // 실제 시뮬레이션을 도는 본체
|
||||
const PSX::PxActor* m_pRigidBody = { nullptr }; // 실제 시뮬레이션을 도는 본체
|
||||
|
||||
CTransform* m_pTransform = { nullptr };
|
||||
|
||||
@@ -74,7 +74,7 @@ class ENGINE_DLL CRigidBody final : public CComponent
|
||||
_float m_fDensity = { 1000.f };
|
||||
#pragma endregion
|
||||
#pragma region STATIC
|
||||
_wstring m_wstrMeshKey = { }; // 짝꿍 스태틱 메시의 triangleMesh 키
|
||||
_wstring m_wstrMeshKey = { }; // 짝꿍 스태틱 메시의 triangleMesh 키
|
||||
#pragma endregion
|
||||
|
||||
private:
|
||||
@@ -97,4 +97,4 @@ class ENGINE_DLL CRigidBody final : public CComponent
|
||||
virtual void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -23,15 +23,31 @@ class ENGINE_DLL CShader final : public CComponent
|
||||
HRESULT Bind_SRV(const _char* pConstantName, ID3D11ShaderResourceView* pSRV);
|
||||
HRESULT Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView** ppSRV, _uint iNumSRVs);
|
||||
|
||||
|
||||
private:
|
||||
HRESULT CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
HRESULT Shader_Refresh();
|
||||
#endif
|
||||
|
||||
public:
|
||||
HRESULT Begin(_uint iPassIndex);
|
||||
|
||||
private:
|
||||
ID3DX11Effect* m_pEffect = { nullptr };
|
||||
ID3DX11Effect* m_pEffect = { nullptr };
|
||||
_uint m_iNumPasses = {};
|
||||
vector<ID3D11InputLayout*> m_InputLayouts;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_wstring m_strShaderPath = {};
|
||||
const D3D11_INPUT_ELEMENT_DESC* m_pElements = nullptr;
|
||||
_uint m_iNumElements = {};
|
||||
#endif
|
||||
|
||||
public:
|
||||
static CShader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -13,6 +13,7 @@ class ENGINE_DLL CTransform final :
|
||||
_float fRotationPerSec = 0.f;
|
||||
_float fRadius = 20.f;
|
||||
}TRANSFORM_DESC;
|
||||
|
||||
private:
|
||||
CTransform(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CTransform(const CTransform& rhs);
|
||||
@@ -32,6 +33,7 @@ class ENGINE_DLL CTransform final :
|
||||
_vector Get_QuarternionVector() const; // 현재 회전정보를 담고 있는 쿼터니언 벡터를 out
|
||||
_vector Get_RollPitchYawVector() const;
|
||||
_vector Get_State(STATE eState) const { return XMLoadFloat4(reinterpret_cast<const _float4*>(&m_WorldMatrix.m[ENUM_CLASS(eState)])); }
|
||||
const _float4* Get_StatePtr(STATE eState) { return reinterpret_cast<_float4*>(&m_WorldMatrix.m[ENUM_CLASS(eState)]); }
|
||||
const _float4x4* Get_WorldMatrixPtr() const { return &m_WorldMatrix; }
|
||||
const _matrix Get_XMWorldMatrix() const { return XMLoadFloat4x4(&m_WorldMatrix); }
|
||||
const _matrix Get_WorldMatrixInv() const { return XMMatrixInverse(nullptr, XMLoadFloat4x4(&m_WorldMatrix)); }
|
||||
|
||||
@@ -64,8 +64,11 @@ class ENGINE_DLL CUIObject abstract : public CGameObject
|
||||
virtual void Nine_Slice_Right(_float Y);
|
||||
virtual void Nine_Slice_Top(_float Z);
|
||||
virtual void Nine_Slice_Bottom(_float W);
|
||||
virtual _float Get_Nine_Slice_Left();
|
||||
virtual _float Get_Nine_Slice_Right();
|
||||
virtual _float Get_Nine_Slice_Top();
|
||||
virtual _float Get_Nine_Slice_Bottom();
|
||||
|
||||
public:
|
||||
virtual _float2 Get_Origin_Position(); // Start Position
|
||||
virtual _vector Get_Current_Position(); // Current Position
|
||||
virtual _float3 Get_Origin_Size(); // Start Size
|
||||
@@ -104,7 +107,11 @@ class ENGINE_DLL CUIObject abstract : public CGameObject
|
||||
|
||||
RECT m_pRect{};
|
||||
|
||||
_vector m_vNine_Slice{};
|
||||
_float4 m_vNine_Slice{};
|
||||
_float m_fLeft{};
|
||||
_float m_fRight{};
|
||||
_float m_fTop{};
|
||||
_float m_fBottom{};
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype();
|
||||
|
||||
Reference in New Issue
Block a user