오류잡음
This commit is contained in:
@@ -287,6 +287,7 @@ void CPlayer::Free()
|
||||
SAFE_RELEASE(m_pCamPosition_TopDown_LookPart);
|
||||
SAFE_RELEASE(m_pCamPosition_ShoulderPart);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Describe_Entity()
|
||||
{
|
||||
@@ -324,3 +325,7 @@ void CPlayer::Describe_Entity()
|
||||
GUI::Checkbox("Render", &m_bVisible);
|
||||
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ void CAnimation::InterpAnim(CAnimation* pPreAnim, vector<CBone*>& Bones, float f
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CAnimation::CreateGPUData(ID3D11Device* pDevice)
|
||||
{
|
||||
vector<CHANNEL_DESC> channels;
|
||||
|
||||
@@ -79,18 +79,6 @@ CBone* CBone::Create(const aiNode* pAINode, _int iParentIndex)
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CBone* CBone::Create(const SaveNode& _SaveNode, _int iParentIndex)
|
||||
{
|
||||
CBone* pInstance = new CBone();
|
||||
|
||||
if (FAILED(pInstance->Initialize(_SaveNode, iParentIndex)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBone");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
HRESULT CBone::Initialize(const aiNode* pAINode, _int iParentIndex)
|
||||
{
|
||||
@@ -107,6 +95,18 @@ HRESULT CBone::Initialize(const aiNode* pAINode, _int iParentIndex)
|
||||
}
|
||||
#endif
|
||||
|
||||
CBone* CBone::Create(const SaveNode& _SaveNode, _int iParentIndex)
|
||||
{
|
||||
CBone* pInstance = new CBone();
|
||||
|
||||
if (FAILED(pInstance->Initialize(_SaveNode, iParentIndex)))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBone");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
HRESULT CBone::Initialize(HANDLE hFile, DWORD& dwByte)
|
||||
{
|
||||
|
||||
@@ -60,6 +60,19 @@ HRESULT CChannel::Initialize(const vector<CBone*>& Bones, const aiNodeAnim* pAIC
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CChannel* CChannel::Create(const vector<CBone*>& Bones, const aiNodeAnim* pAIChannel)
|
||||
{
|
||||
CChannel* pInstance = new CChannel();
|
||||
|
||||
if (FAILED(pInstance->Initialize(Bones, pAIChannel))) {
|
||||
MSG_BOX("Failed to Created : CChannel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void CChannel::Fill_GPU_Keyframes(vector<KEYFRAME_DESC>& outKeyframes)
|
||||
{
|
||||
for (_uint i = 0; i < m_iNumKeyFrames; i++)
|
||||
@@ -86,20 +99,6 @@ CHANNEL_DESC CChannel::Fill_GPU_ChannelDesc()
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
CChannel* CChannel::Create(const vector<CBone*>& Bones, const aiNodeAnim* pAIChannel)
|
||||
{
|
||||
CChannel* pInstance = new CChannel();
|
||||
|
||||
if (FAILED(pInstance->Initialize(Bones, pAIChannel))) {
|
||||
MSG_BOX("Failed to Created : CChannel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
HRESULT CChannel::Initialize(const vector<CBone*>& Bones, _uint iIndex)
|
||||
{
|
||||
m_iBoneIndex = iIndex;
|
||||
|
||||
@@ -610,16 +610,20 @@ void CGameInstance::Add_ModelToMap(const _char* filePath, CModel* pModel)
|
||||
{
|
||||
m_ModelMap[filePath] = pModel;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void CGameInstance::Add_SaveModel(const _char* filePath, SaveModel sModel)
|
||||
{
|
||||
m_sModelMap[filePath] = sModel;
|
||||
}
|
||||
|
||||
SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
{
|
||||
auto iter = m_sModelMap.find(filePath);
|
||||
return &iter->second;
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Create_Material(_float3* vMatInfo)
|
||||
|
||||
@@ -905,6 +905,7 @@ HRESULT CModel::Create_ParentVB()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
|
||||
{
|
||||
m_eType = eType;
|
||||
@@ -927,6 +928,7 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _
|
||||
if (FAILED(Assimp_Model_Load(pModelFilePath, eType, PreTransformMatrix, 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SaveAssimpModel(Temp);
|
||||
|
||||
return S_OK;
|
||||
@@ -953,6 +955,41 @@ HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
#ifndef _DEBUG
|
||||
|
||||
HRESULT CModel::Initialize_Prototype(MODEL eType, const _char* pModelFilePath, _fmatrix PreTransformMatrix)
|
||||
{
|
||||
m_eType = eType;
|
||||
|
||||
LoadData(pModelFilePath);
|
||||
|
||||
m_pSaveModel = m_pGameInstance->Load_SaveModel(pModelFilePath);
|
||||
|
||||
LoadAdditionalAnimations(pModelFilePath);
|
||||
|
||||
XMStoreFloat4x4(&m_PreTransformMatrix, PreTransformMatrix);
|
||||
|
||||
Ready_Bones(m_pSaveModel->Nodes, 0, -1);
|
||||
|
||||
if (FAILED(Ready_Meshes())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Materials(pModelFilePath))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Animations(m_Bones))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
void CModel::LoadAdditionalAnimations(const char* ModelFilePath)
|
||||
{
|
||||
filesystem::path fullPath(ModelFilePath);
|
||||
|
||||
@@ -48,6 +48,7 @@ HRESULT CUnit::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CUnit::Load_KeyFrame()
|
||||
{
|
||||
FILE* fp = nullptr;
|
||||
@@ -90,7 +91,7 @@ void CUnit::Load_KeyFrame()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
_float CUnit::Get_KeyFrame(_string FrameName)
|
||||
{
|
||||
auto iter = m_KeyFrames.find(FrameName);
|
||||
|
||||
@@ -21,7 +21,12 @@ class ENGINE_DLL CAnimation : public CBase
|
||||
void Set_AnimProgressPostion(const _char* pChannelName, _uint iPosition);
|
||||
vector<_int>* Capture_Bones();
|
||||
void InterpAnim(CAnimation* pPreAnim, vector<CBone*>& Bones, float fRatio);
|
||||
|
||||
|
||||
|
||||
void CreateGPUData(ID3D11Device* pDevice);
|
||||
|
||||
|
||||
vector<LERPDESC> Get_StartFrameInformations() { return m_StartKeyFrames; }
|
||||
const _string& Get_Name() const { return m_strName; }
|
||||
|
||||
|
||||
@@ -16,9 +16,11 @@ class ENGINE_DLL CChannel : public CBase
|
||||
|
||||
public:
|
||||
static CChannel* Create(const vector<class CBone*>& Bones, const aiNodeAnim* pAIChannel);
|
||||
|
||||
#endif // EDITOR_PROJECT
|
||||
public:
|
||||
void Fill_GPU_Keyframes(vector<KEYFRAME_DESC>& outKeyframes);
|
||||
CHANNEL_DESC Fill_GPU_ChannelDesc();
|
||||
#endif // EDITOR_PROJECT
|
||||
|
||||
public:
|
||||
void Update_TransformationMatirx(const vector<class CBone*>& Bones, const LOCALPOS_DESC* pLocalPosArray, _float fCurrentTrackPosition, _uint* pCurrentKeyFrameIndex,class CTransform* pTransform=nullptr);
|
||||
|
||||
@@ -260,9 +260,9 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
|
||||
vector<const _char*> m_FilePaths = {};
|
||||
map<const _char*, CModel*> m_ModelMap;
|
||||
map<const _char*, SaveModel> m_sModelMap;
|
||||
#endif // _DEBUG
|
||||
|
||||
#endif // _DEBUG
|
||||
map<const _char*, SaveModel> m_sModelMap;
|
||||
public:
|
||||
void Release_Engine();
|
||||
virtual void Free() override;
|
||||
|
||||
Reference in New Issue
Block a user