[fix] ShaderBugs

[add] Model Access
This commit is contained in:
kimnuri
2025-12-30 19:25:43 +09:00
parent 02c41f6975
commit a0e1689f67
38 changed files with 734 additions and 507 deletions
+32 -6
View File
@@ -1,12 +1,12 @@
#include "pch.h"
#include "Model.h"
#include "Bone.h"
#include "Mesh.h"
#include "Material.h"
#include "Animation.h"
#include "GameObject.h"
#include "Transform.h"
#include "Bone.h"
#include "ComputeShader.h"
#include "GameObject.h"
#include "Material.h"
#include "Mesh.h"
#include "Model.h"
#include "Transform.h"
CModel::CModel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CComponent{ pDevice, pContext }
@@ -119,6 +119,22 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha
return m_Meshes[iMeshIndex]->Bind_BoneMatrices(m_Bones, pShader, pConstantName);
}
HRESULT CModel::Capture_BoneMatrices(_uint iMeshIndex, vector<_float4x4>& pDestination)
{
if (iMeshIndex >= m_iNumMeshes) {
return E_FAIL;
}
return m_Meshes[iMeshIndex]->Copy_BoneMatrices(pDestination);
}
_int CModel::Get_MeshInfluencedBoneNum(_uint iMeshIndex)
{
if (iMeshIndex >= m_iNumMeshes) {
return E_FAIL;
}
return m_Meshes[iMeshIndex]->Get_NumBone();
}
_bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform)
{
if (!m_bPlayAnim){
@@ -699,6 +715,16 @@ HRESULT CModel::Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix
return S_OK;
}
//HRESULT CModel::Set_BoneLocalTransformationMatrix(const _char* pBoneName, _fmatrix newTransformation)
//{
// _int iBoneIndex = Find_BoneIndex(pBoneName);
// if (iBoneIndex < 0) {
// return E_FAIL;
// }
// m_Bones[iBoneIndex]->Set_TransformationMatrix(newTransformation);
// return S_OK;
//}
void CModel::Set_CurrentTrackPosition(_float TrackPosition)
{