용수정

용수정
This commit is contained in:
hyunbin14
2025-12-22 12:00:09 +09:00
parent b5c5fecf70
commit 2e5ce740b9
4 changed files with 56 additions and 28 deletions
+18 -3
View File
@@ -175,7 +175,7 @@ _bool CModel::Play_Anim(_float fTimeDelta, CTransform* pTransform)
}
ComputeAnimation(m_iCurrentAnimIndex, 0);
ComputeAnimation(m_iCurrentAnimIndex, m_iIndexAnimPlayableMesh);
if (m_bIsFinishedAnim)
{
@@ -2232,14 +2232,29 @@ HRESULT CModel::Initialize(void* pArg)
Create_ParentSrv();
Create_BoneLocalSrv();
if (FAILED(Create_ComputeShaderLocal()))
if (FAILED(Create_ComputeShaderLocal())){
return E_FAIL;
}
if (FAILED(Create_ComputeShader()))
if (FAILED(Create_ComputeShader())){
return E_FAIL;
}
for (int i = 0; i < m_Meshes.size(); i++)
{
if (1 < m_Meshes[i]->Get_NumBone()) {
m_iIndexAnimPlayableMesh = i;
break;
}
}
if (-1 == m_iIndexAnimPlayableMesh) {
assert(false);
}
}
return S_OK;
}
+2
View File
@@ -41,6 +41,7 @@ class ENGINE_DLL CModel final : public CComponent
_float4x4 Get_PreTransformMatrix() const { return m_PreTransformMatrix; };
virtual HRESULT Render(_uint iMeshIndex);
virtual HRESULT Render_Indexed(_uint iMeshIndex, _uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
MODEL Get_Type() { return m_eType; }
#pragma endregion
#pragma region Animation
_bool Play_Animation(_float fTimeDelta, class CTransform* pTransform = nullptr); // 애니메이션에 델타타임을 넣어줌
@@ -180,6 +181,7 @@ class ENGINE_DLL CModel final : public CComponent
_float m_fRadius = { 0.f }; // 컬링용 Radius
_int m_iRootBoneIndex = { -1 }; // 루트본의 인덱스
_int m_iIndexAnimPlayableMesh = { -1 };
_vector m_vector[3];
vector<_uint> m_iBoneMask;