[move] player bones
This commit is contained in:
@@ -1789,7 +1789,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.001f };
|
||||
Desc.fContactOffset = { 0.005f };
|
||||
Desc.vhalfGeometryInfo = { 0.025f, 0.075f, 0.f };
|
||||
Desc.vhalfGeometryInfo = { 0.025f, 0.085f, 0.f };
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
@@ -1808,7 +1808,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.01f };
|
||||
Desc.fContactOffset = { 0.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.06f, 0.25f, 0.f };
|
||||
Desc.vhalfGeometryInfo = { 0.12f, 0.25f, 0.f };
|
||||
Desc.fDensity = 122.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
|
||||
@@ -34,24 +34,6 @@ void CPlayerRobe::Late_Update(_float fTimeDelta)
|
||||
if (true == bBroken) {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
const PSX::PxU32 shapeCount = m_pRobeJointRoute[i]->Get_Actor()->getNbShapes();
|
||||
std::vector<PSX::PxShape*> shapePointerArray(shapeCount, nullptr);
|
||||
|
||||
// (out) shapePointerArray에 shape 포인터들이 채워짐
|
||||
const PSX::PxU32 writtenCount = m_pRobeJointRoute[i]->Get_Actor()->getShapes(shapePointerArray.data(), shapeCount);
|
||||
|
||||
for (PSX::PxU32 shapeIndex = 0; shapeIndex < writtenCount; ++shapeIndex) {
|
||||
PSX::PxShape* shapePointer = shapePointerArray[shapeIndex];
|
||||
if (shapePointer == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PSX::PxTransform shapeLocalPose = shapePointer->getLocalPose();
|
||||
shapeLocalPose.p;
|
||||
shapeLocalPose.q;
|
||||
// 여기서 shapeLocalPose.p / shapeLocalPose.q 를 찍어서 확인
|
||||
}
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
@@ -65,7 +47,13 @@ HRESULT CPlayerRobe::Render()
|
||||
|
||||
HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
{
|
||||
|
||||
PSX::PxTransform pxTransform = {};
|
||||
_matrix WorldMatrix = {};
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
|
||||
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
|
||||
m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], WorldMatrix);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -60,7 +60,7 @@ void CLevel_Logo::Update(_float fTimeDelta)
|
||||
return;
|
||||
#endif // gimch
|
||||
#ifdef 기무리
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::PHYSX))))
|
||||
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
|
||||
return;
|
||||
#endif // 기무리
|
||||
#ifdef 진우
|
||||
|
||||
@@ -2542,9 +2542,9 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector_Anim.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
|
||||
// CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
|
||||
// return E_FAIL;
|
||||
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
|
||||
@@ -2631,10 +2631,10 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
TEXT("Prototype_Component_GerboldOlivander_Model")
|
||||
));
|
||||
|
||||
//futures.emplace_back(Deferred_ModelLoad(
|
||||
// MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin",XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
// TEXT("Prototype_Component_Playable_Model")
|
||||
//));
|
||||
futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin",XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
|
||||
TEXT("Prototype_Component_Playable_Model")
|
||||
));
|
||||
|
||||
/*futures.emplace_back(Deferred_ModelLoad(
|
||||
MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(),
|
||||
|
||||
@@ -559,9 +559,9 @@ const _float4x4* CModel::Get_BoneLocalMatrixPtr(const _char* pBoneName)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//Mark_CPUChain(boneIdx);
|
||||
Mark_CPUChain(boneIdx);
|
||||
|
||||
//Apply_CPUMask_ToBones();
|
||||
Apply_CPUMask_ToBones();
|
||||
|
||||
return m_Bones[boneIdx]->Get_TransformationMatrixPtr();
|
||||
}
|
||||
@@ -638,6 +638,16 @@ _int CModel::Find_BoneIndex(const _char* pBoneName)
|
||||
return -1;
|
||||
}
|
||||
|
||||
HRESULT CModel::Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation)
|
||||
{
|
||||
_int iBoneIndex = Find_BoneIndex(pBoneName);
|
||||
if (iBoneIndex < 0) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_Bones[iBoneIndex]->Set_CombinedTransformationMatrix(newTransformation);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CModel::Set_CurrentTrackPosition(_float TrackPosition)
|
||||
{
|
||||
|
||||
@@ -15,12 +15,8 @@ class ENGINE_DLL CBone final : public CBase
|
||||
_float4x4* Get_CombinedTransformationMatrixPtr() { return &m_CombinedTransformationMatrix; }
|
||||
_float4x4* Get_TransformationMatrixPtr() { return &m_TransformationMatrix; };
|
||||
|
||||
void Set_CombinedTransformationMatrixPtr(_matrix& newMatrix) {
|
||||
return XMStoreFloat4x4(&m_CombinedTransformationMatrix, newMatrix);
|
||||
}
|
||||
_bool Compare_Name(const _char* pBoneName) const {
|
||||
return !strcmp(pBoneName, m_strName.c_str());
|
||||
}
|
||||
void Set_CombinedTransformationMatrix(_fmatrix newMatrix) { return XMStoreFloat4x4(&m_CombinedTransformationMatrix, newMatrix); }
|
||||
_bool Compare_Name(const _char* pBoneName) const { return !strcmp(pBoneName, m_strName.c_str()); }
|
||||
void Get_KeyFrame(KEYFRAME& kf, _bool bIsCurrentFrame); // 현재 본의 로컬매트릭스를 캡쳐해서 키프레임으로 성분 분해하여 올려보낸다.
|
||||
const _char* Get_Name() const { return m_strName.c_str(); }
|
||||
_float3 Get_LocalPosition();
|
||||
|
||||
@@ -95,6 +95,7 @@ class ENGINE_DLL CModel final : public CComponent
|
||||
void Combined_BoneMatrix();
|
||||
void Combined_BoneMatrix(_int iStartBoneIndex, _uint iBoneCount);
|
||||
_int Find_BoneIndex(const _char* pBoneName);
|
||||
HRESULT Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation);
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Material
|
||||
|
||||
Reference in New Issue
Block a user