용수정
용수정
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user