diff --git a/.gitignore b/.gitignore index 8ce467e13..5484ffc9a 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ x64/ Release/ Debug/ Inc/ +enc_temp_folder/ Jusin154_Team3D/Client/Bin/Resources/ # Imgui 임시 파일 diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 53519c337..91c5b41bf 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -440,6 +440,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 8b1dd71e2..de6be1d11 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -2412,6 +2412,9 @@ 02.GameObjects\Environment\02.InstancedProp\Light + + 02.GameObjects\Player\Robe + diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 5063571b3..4e6e4bf82 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -231,13 +231,6 @@ HRESULT CPlayer::Render() if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) { return E_FAIL; } -//#ifdef _DEBUG -//#ifdef 기무리 -// if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) { -// return E_FAIL; -// } -//#endif // 기무리 -//#endif // _DEBUG if (FAILED(m_pShaderCom->Bind_Matrices( "g_OffsetMatrix", m_pModelCom->Get_OffsetMatrix(i).data(), diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp index a1d623676..4503181d7 100644 --- a/Jusin154_Team3D/Client/Private/PlayerRobe.cpp +++ b/Jusin154_Team3D/Client/Private/PlayerRobe.cpp @@ -2,31 +2,21 @@ #include "PlayerRobe.h" #include "GameInstance.h" -CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - : CPartObject(pDevice, pContext) -{ -} - -CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) - : CPartObject(Prototype) -{ -} void CPlayerRobe::Priority_Update(_float fTimeDelta) { #ifdef _DEBUG #ifdef 기무리 + Describe_Entity(); Update_RobeJoints(); #endif // 기무리 - - Describe_Entity(); #endif // _DEBUG } void CPlayerRobe::Update(_float fTimeDelta) { - _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) * - XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()); + _matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) + * XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr()); m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false); m_pRobeMainAnchor->Get_Actor()->wakeUp(); @@ -72,29 +62,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition() return S_OK; } -HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) -{ - - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); - - - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - - return S_OK; -} - HRESULT CPlayerRobe::Update_LegsPosition() { _matrix WorldMatrix = m_pParentTransformCom->Get_XMWorldMatrix(); @@ -259,98 +226,110 @@ HRESULT CPlayerRobe::Update_RobeJoints() switch (PLAYER_JOINT_ORDER(i)) { /* From Origin */ - case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START: - case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START: - case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 40.f; - break; - case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END: - case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END: - case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 40.f; - break; - - + { + case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 40.f; + break; + case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_END: + case PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_END: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 40.f; + break; + } /* From_Middle */ - case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START: - case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START: - case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START: - m_JointDescriptions[i].iMotionTwist = 0; - m_JointDescriptions[i].iMotionSwing1 = 0; - m_JointDescriptions[i].iMotionSwing2 = 0; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - m_JointDescriptions[i].fSwingDeg = 10.f; - break; - - case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END: - case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END: - case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fSwingDeg = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 0.f; - - m_JointDescriptions[i].bEnableSlerpDrive = true; - m_JointDescriptions[i].fLinearStiffness = 10.f; - m_JointDescriptions[i].fSlerpDamping = 3.f; - m_JointDescriptions[i].fSlerpForceLimit = 40.f; - m_JointDescriptions[i].bSlerpAccel = true; - break; + { + case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START: + case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START: + case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START: + case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START: + case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START: + m_JointDescriptions[i].iMotionTwist = 0; + m_JointDescriptions[i].iMotionSwing1 = 0; + m_JointDescriptions[i].iMotionSwing2 = 0; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].fSwingDeg = 10.f; + break; + case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END: + case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END: + case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END: + case PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_END: + case PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_END: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fSwingDeg = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 0.f; + m_JointDescriptions[i].bEnableSlerpDrive = true; + m_JointDescriptions[i].fLinearStiffness = 10.f; + m_JointDescriptions[i].fSlerpDamping = 3.f; + m_JointDescriptions[i].fSlerpForceLimit = 40.f; + m_JointDescriptions[i].bSlerpAccel = true; + break; + } /* From_Lower */ - case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START: - case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + { + case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START: + case PLAYER_JOINT_ORDER::RSIDE_TO_R_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; - case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_END: - case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END: - break; - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START: - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + case PLAYER_JOINT_ORDER::RSIDE_TO_R_END: + case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END: + break; - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END: - case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END: - break; - case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START: - case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START: - m_JointDescriptions[i].iMotionTwist = 1; - m_JointDescriptions[i].iMotionSwing1 = 1; - m_JointDescriptions[i].iMotionSwing2 = 1; - m_JointDescriptions[i].fLinearLimit = 0.f; - m_JointDescriptions[i].fTwistAbsDeg = 15.f; - m_JointDescriptions[i].fSwingDeg = 15.f; - break; + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START: + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; - case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_END: - case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END: - break; + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END: + case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END: + break; + + case PLAYER_JOINT_ORDER::LSIDE_TO_L_START: + case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START: + m_JointDescriptions[i].iMotionTwist = 1; + m_JointDescriptions[i].iMotionSwing1 = 1; + m_JointDescriptions[i].iMotionSwing2 = 1; + m_JointDescriptions[i].fLinearLimit = 0.f; + m_JointDescriptions[i].fTwistAbsDeg = 15.f; + m_JointDescriptions[i].fSwingDeg = 15.f; + break; + + case PLAYER_JOINT_ORDER::LSIDE_TO_L_END: + case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END: + break; + } default: break; } @@ -358,423 +337,6 @@ HRESULT CPlayerRobe::Update_RobeJoints() } return S_OK; } -HRESULT CPlayerRobe::Ready_Components() -{ - __super::Ready_Components(nullptr); - - _matrix socketWorld = /*XMMatrixRotationZ(XM_PIDIV2) * */XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix(); - _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { }; - for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) { - xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld; - } - - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) { - return E_FAIL; - } - } - - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) { - return E_FAIL; - } - } - { // - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) { - return E_FAIL; - } - } - { // RobeSocket - { // Fixed_MainAnchor - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) { - return E_FAIL; - } - m_pRobeMainAnchor->Set_Kinematic(true); - m_pRobeMainAnchor->Set_Transform(socketWorld, true); -#ifdef _DEBUG - m_pRobeMainAnchor->Set_Name("MainAnchor"); -#endif // _DEBUG - } - // SubAnchors - for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; - Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); - Desc.bAutoOwnerTranslation = false; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) { - return E_FAIL; - } - - m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true); -#ifdef _DEBUG - m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]); -#endif // _DEBUG - } - } - { // RobeRoute - CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {}; - ROUTE_DESC Desc_Route = {}; - Desc_Body.bAutoOwnerTranslation = false; - Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE); - /*Origin_Linked_Routes*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP); - Desc_Route.iStartBoneIndex = -1; - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { - return E_FAIL; - } - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); -#ifdef _DEBUG - m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_Name("Origin_Linked_Routes"); -#endif // _DEBUG - { // Joint - PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); - PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); - PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); - - PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- - PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ - - m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); - m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); - } - } - } - /*UP_TO_MIDDLE*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - } - /*MIDDLE_TO_DOWN*/ - { - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_R); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_L); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - { - Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); - Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT); - Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); - Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; - Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); - } - } - } - return S_OK; -} - -HRESULT CPlayerRobe::Initialize_Prototype() -{ - return S_OK; -} - -HRESULT CPlayerRobe::Initialize(void* pArg) -{ - PlayerRobe_DESC* pDesc = static_cast (pArg); - m_pSocketMatrix = pDesc->pSocketMatrix; - m_pModelCom = pDesc->pModel; - - m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)); - - m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); - m_PrevRobeBoneMatrices.resize(m_iBoneNum); - if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) { - return E_FAIL; - } - - m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); - m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); - m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); - m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); - - m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg"); - m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg"); - m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips"); - - XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]); - } - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) - { - _uint iParentIndex = UINT_MAX; - _bool bCopyPreTransform = false; - - switch ((PLAYER_JOINT_BONE_ORDER)i) - { - case PLAYER_JOINT_BONE_ORDER::RIGHTUP: - case PLAYER_JOINT_BONE_ORDER::TAILUP: - case PLAYER_JOINT_BONE_ORDER::LEFTUP: - bCopyPreTransform = true; - break; - - case PLAYER_JOINT_BONE_ORDER::RIGHT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); - break; - case PLAYER_JOINT_BONE_ORDER::TAIL: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); - break; - case PLAYER_JOINT_BONE_ORDER::LEFT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); - break; - case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNRIGHT: - case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); - break; - case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN: - case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); - break; - case PLAYER_JOINT_BONE_ORDER::LEFTDOWN: - case PLAYER_JOINT_BONE_ORDER::LEFTDOWNLEFT: - iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); - break; - default: - assert(false); - break; - } - - if (true == bCopyPreTransform) - { - _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix); - - XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); - continue; - } - - _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) - * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]); - - XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); - } - - if (FAILED(__super::Initialize(pArg))) { - return E_FAIL; - } - - if (FAILED(Ready_Components())) { - return E_FAIL; - } - - D6JOINTDESC JointDesc = D6JOINTDESC(); - for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) { - JointDesc.ApplyToJoint(*m_pDynamicJoints[i]); - m_JointDescriptions[i] = JointDesc; - } - Update_LegsPosition(); - Update_RobeJoints(); - -#ifdef _DEBUG - m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false)); - m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false)); - D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {}; - depthStencilDesc.DepthEnable = FALSE; - depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; - depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; - depthStencilDesc.StencilEnable = FALSE; - - HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone); - if (FAILED(result)){ - return E_FAIL; - } -#endif // _DEBUG - return S_OK; -} - -CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) -{ - CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext); - - if (FAILED(pInstance->Initialize_Prototype())) - { - MSG_BOX("Failed to Created : CPlayerRobe"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - -CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner) -{ - CPlayerRobe* pInstance = new CPlayerRobe(*this); - pInstance->m_pOwner = pOwner; - if (FAILED(pInstance->Initialize(pArg))) - { - MSG_BOX("Failed to Cloned : CPlayerRobe"); - SAFE_RELEASE(pInstance); - } - - return pInstance; -} - -void CPlayerRobe::Free() -{ - __super::Free(); -#ifdef _DEBUG - SAFE_RELEASE(m_pDepthStencilStateNone); -#endif // _DEBUG - SAFE_RELEASE(m_pRightLeg); - SAFE_RELEASE(m_pLeftLeg); - SAFE_RELEASE(m_pRightThigh); - SAFE_RELEASE(m_pLeftThigh); - SAFE_RELEASE(m_pLower0Bound); - SAFE_RELEASE(m_pLower1Bound); - SAFE_RELEASE(m_pRobeMainAnchor); - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { - SAFE_RELEASE(m_pRobeJointRoute[i]); - } - for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { - SAFE_RELEASE(m_pRobeJointAnchor[i]); - } -} #ifdef _DEBUG void CPlayerRobe::Describe_Entity() diff --git a/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp new file mode 100644 index 000000000..75ed8a63a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/PlayerRobe_Initialize.cpp @@ -0,0 +1,511 @@ +#include "pch.h" +#include "PlayerRobe.h" +#include "GameInstance.h" + +CPlayerRobe::CPlayerRobe(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CPartObject(pDevice, pContext) { } +CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype) : CPartObject(Prototype) { } +HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld) +{ + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(xmAnchorMatricesWorld[Desc_Route.iStartBoneIndex].r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iStartBoneIndex]->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + + return S_OK; +} +HRESULT CPlayerRobe::Ready_Components() +{ + __super::Ready_Components(nullptr); + + _matrix socketWorld = XMLoadFloat4x4(m_pSocketMatrix) * m_pParentTransformCom->Get_XMWorldMatrix(); + _matrix xmAnchorMatricesWorld[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { }; + for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++iBoneIndex) { + xmAnchorMatricesWorld[iBoneIndex] = XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iBoneIndex]) * socketWorld; + } +#pragma region BASIC_COMP + { // LLEG + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) { + return E_FAIL; + } + } + { // RLEG + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) { + return E_FAIL; + } + } + + { // LTHIGH + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftThigh, &Desc))) { + return E_FAIL; + } + } + { // RTHIGH + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightThigh, &Desc))) { + return E_FAIL; + } + } + { // L0BOUND + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) { + return E_FAIL; + } + } + { // L1BOUND + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) { + return E_FAIL; + } + } +#pragma endregion +#pragma region SOCKET +#pragma region SOCKET_DECLARE + { // RobeSocket + { // Fixed_MainAnchor + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeMainAnchor, &Desc))) { + return E_FAIL; + } + m_pRobeMainAnchor->Set_Kinematic(true); + m_pRobeMainAnchor->Set_Transform(socketWorld, true); +#ifdef _DEBUG + m_pRobeMainAnchor->Set_Name("MainAnchor"); +#endif // _DEBUG + } + // SubAnchors + for (_int i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{}; + Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ANCHOR); + Desc.bAutoOwnerTranslation = false; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ANCHOR"), (CComponent**)&m_pRobeJointAnchor[i], &Desc))) { + return E_FAIL; + } + + m_pRobeJointAnchor[i]->Set_Transform(xmAnchorMatricesWorld[i], true); +#ifdef _DEBUG + m_pRobeJointAnchor[i]->Set_Name(PLAYER_JOINT_BONE_NAMES[i]); +#endif // _DEBUG + } + } +#pragma endregion + { // RobeRoute + CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc_Body = {}; + ROUTE_DESC Desc_Route = {}; + Desc_Body.bAutoOwnerTranslation = false; + Desc_Body.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE); + /*Origin_Linked_Routes*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_TUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_RSIDEUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RSIDEUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::ORIGIN_TO_LSIDEUP); + Desc_Route.iStartBoneIndex = -1; + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_LSIDEUP_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[Desc_Route.iTargetRouteIndex], &Desc_Body))) { + return E_FAIL; + } + m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Set_CenterTransform(socketWorld.r[3], xmAnchorMatricesWorld[Desc_Route.iEndBoneIndex].r[3], true); + { // Joint + PSX::PxRigidDynamic* startAnchorRigidActor = m_pRobeMainAnchor->Get_Actor(); + PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor(); + PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor(); + + PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y-- + PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++ + + m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose); + m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose); + } + } + } + /*UP_TO_MIDDLE*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RUP_TO_RMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TUP_TO_TMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LUP_TO_LMIDDLE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDEUP_TO_RSIDE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDEUP_TO_RSIDE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDEUP_TO_LSIDE); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDEUP_TO_LSIDE_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + } + /*MIDDLE_TO_DOWN*/ + { + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RMIDDLE_TO_RR); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::RSIDE_TO_R); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::RSIDE_TO_R_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TR); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::TMIDDLE_TO_TL); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LSIDE_TO_L); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LSIDE_TO_L_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + { + Desc_Route.iTargetRouteIndex = ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::LMIDDLE_TO_LL); + Desc_Route.iStartBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + Desc_Route.iEndBoneIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTDOWN); + Desc_Route.iStartJointIndex = ENUM_CLASS(PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START); + Desc_Route.iEndJointIndex = Desc_Route.iStartJointIndex + 1; + Helper_RouteJointGenerater(Desc_Body, Desc_Route, xmAnchorMatricesWorld); + } + } + } +#pragma endregion + return S_OK; +} +HRESULT CPlayerRobe::Initialize_Prototype() { return S_OK; } +HRESULT CPlayerRobe::Initialize(void* pArg) +{ + PlayerRobe_DESC* pDesc = static_cast (pArg); + m_pSocketMatrix = pDesc->pSocketMatrix; + m_pModelCom = pDesc->pModel; + + m_ReconstructedJointAnchorMatirces.resize(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)); + + m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH)); + m_PrevRobeBoneMatrices.resize(m_iBoneNum); + if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) { + return E_FAIL; + } + + // Leg-Thigh + m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot"); + m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg"); + m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot"); + m_pRightLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightLeg"); + m_pLeftLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftUpLeg"); + m_pRightLegUpLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightUpLeg"); + + // Circle + m_pLower1BoundMatrix = m_pLower0BoundMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips"); + +#pragma region READY_INITIAL_COMBINED_TRANSFORMATIONMATRIX + XMStoreFloat4x4(&m_PreTransformMatrix, XMLoadFloat4x4(m_pModelCom->Get_PreTransformMatrixPtr())); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + m_RobeJointAnchorMatrices[i] = m_pModelCom->Get_BoneLocalMatrixPtr(PLAYER_JOINT_BONE_NAMES[i]); + } + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) + { + _uint iParentIndex = UINT_MAX; + _bool bCopyPreTransform = false; + + switch ((PLAYER_JOINT_BONE_ORDER)i) + { + case PLAYER_JOINT_BONE_ORDER::RIGHTUP: + case PLAYER_JOINT_BONE_ORDER::TAILUP: + case PLAYER_JOINT_BONE_ORDER::LEFTUP: + case PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP: + case PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP: + bCopyPreTransform = true; + break; + + case PLAYER_JOINT_BONE_ORDER::RIGHT: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTUP); + break; + case PLAYER_JOINT_BONE_ORDER::TAIL: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAILUP); + break; + case PLAYER_JOINT_BONE_ORDER::LEFT: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTUP); + break; + case PLAYER_JOINT_BONE_ORDER::RIGHTSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDEUP); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDEUP); + break; + + case PLAYER_JOINT_BONE_ORDER::RIGHTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHT); + break; + case PLAYER_JOINT_BONE_ORDER::TAILRIGHTDOWN: + case PLAYER_JOINT_BONE_ORDER::TAILLEFTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::TAIL); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTDOWN: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFT); + break; + case PLAYER_JOINT_BONE_ORDER::RIGHTDOWNSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::RIGHTSIDE); + break; + case PLAYER_JOINT_BONE_ORDER::LEFTDOWNSIDE: + iParentIndex = ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::LEFTSIDE); + break; + default: + assert(false); + break; + } + + if (true == bCopyPreTransform) + { + _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) * XMLoadFloat4x4(&m_PreTransformMatrix); + + XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); + continue; + } + + _matrix constructedMatrix = XMLoadFloat4x4(m_RobeJointAnchorMatrices[i]) + * XMLoadFloat4x4(&m_ReconstructedJointAnchorMatirces[iParentIndex]); + + XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], constructedMatrix); + } +#pragma endregion + + if (FAILED(__super::Initialize(pArg))) { + return E_FAIL; + } + + if (FAILED(Ready_Components())) { + return E_FAIL; + } + + D6JOINTDESC JointDesc = D6JOINTDESC(); + for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) { + JointDesc.ApplyToJoint(*m_pDynamicJoints[i]); + m_JointDescriptions[i] = JointDesc; + } + + Update_LegsPosition(); + Update_RobeJoints(); + +#ifdef _DEBUG + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false)); + m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false)); + D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {}; + depthStencilDesc.DepthEnable = FALSE; + depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; + depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS; + depthStencilDesc.StencilEnable = FALSE; + + HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone); + if (FAILED(result)){ + return E_FAIL; + } +#endif // _DEBUG + return S_OK; +} + +CPlayerRobe* CPlayerRobe::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CPlayerRobe* pInstance = new CPlayerRobe(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CPlayerRobe"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CPlayerRobe::Clone(void* pArg, CGameObject* pOwner) +{ + CPlayerRobe* pInstance = new CPlayerRobe(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CPlayerRobe"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CPlayerRobe::Free() +{ + __super::Free(); +#ifdef _DEBUG + SAFE_RELEASE(m_pDepthStencilStateNone); +#endif // _DEBUG + SAFE_RELEASE(m_pRightLeg); + SAFE_RELEASE(m_pLeftLeg); + SAFE_RELEASE(m_pRightThigh); + SAFE_RELEASE(m_pLeftThigh); + SAFE_RELEASE(m_pLower0Bound); + SAFE_RELEASE(m_pLower1Bound); + SAFE_RELEASE(m_pRobeMainAnchor); + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeJointRoute[i]); + } + for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) { + SAFE_RELEASE(m_pRobeJointAnchor[i]); + } +} diff --git a/Jusin154_Team3D/Client/Public/Player_ENUM.h b/Jusin154_Team3D/Client/Public/Player_ENUM.h index 7ad5c5a99..b7a757e03 100644 --- a/Jusin154_Team3D/Client/Public/Player_ENUM.h +++ b/Jusin154_Team3D/Client/Public/Player_ENUM.h @@ -23,44 +23,56 @@ enum class PLAYER_MESH_ORDER { END }; -static const _char* PLAYER_JOINT_BONE_NAMES[12] = { +static const _char* PLAYER_JOINT_BONE_NAMES[16] = { "RightUpLeg_Cloth" , "RightLeg_Cloth" , "RightDownLeg_Cloth" - , "RightDownRightLeg_Cloth" , "LeftUpLeg_Cloth" , "LeftLeg_Cloth" , "LeftDownLeg_Cloth" - , "LeftDownLeftLeg_Cloth" , "TailUp_Cloth" , "Tail_Cloth" , "TailLeftDown_Cloth" , "TailRightDown_Cloth" + , "RightSideUpLeg_Cloth" + , "RightSideLeg_Cloth" + , "RightDownSideLeg_Cloth" + + , "LeftSideUpLeg_Cloth" + , "LeftSideLeg_Cloth" + , "LeftDownSideLeg_Cloth" }; enum class PLAYER_JOINT_BONE_ORDER { RIGHTUP , RIGHT , RIGHTDOWN - , RIGHTDOWNRIGHT , LEFTUP , LEFT , LEFTDOWN - , LEFTDOWNLEFT , TAILUP , TAIL , TAILLEFTDOWN , TAILRIGHTDOWN + , RIGHTSIDEUP + , RIGHTSIDE + , RIGHTDOWNSIDE + + , LEFTSIDEUP + , LEFTSIDE + , LEFTDOWNSIDE + , END }; enum class PLAYER_JOINT_ORDER { +#pragma region ORIGIN_TO_UP ORIGIN_TO_RUP_START , ORIGIN_TO_RUP_END @@ -70,7 +82,13 @@ enum class PLAYER_JOINT_ORDER { , ORIGIN_TO_LUP_START , ORIGIN_TO_LUP_END - + , ORIGIN_TO_RSIDEUP_START + , ORIGIN_TO_RSIDEUP_END + + , ORIGIN_TO_LSIDEUP_START + , ORIGIN_TO_LSIDEUP_END +#pragma endregion +#pragma region UP_TO_MIDDLE , RUP_TO_RMIDDLE_START , RUP_TO_RMIDDLE_END @@ -80,26 +98,39 @@ enum class PLAYER_JOINT_ORDER { , LUP_TO_LMIDDLE_START , LUP_TO_LMIDDLE_END + , RSIDEUP_TO_RSIDE_START + , RSIDEUP_TO_RSIDE_END + , LSIDEUP_TO_LSIDE_START + , LSIDEUP_TO_LSIDE_END +#pragma endregion +#pragma region MIDDLE_TO_BOTTOM , RMIDDLE_TO_RR_START , RMIDDLE_TO_RR_END - , RMIDDLE_TO_R_START - , RMIDDLE_TO_R_END - , TMIDDLE_TO_TR_START , TMIDDLE_TO_TR_END , TMIDDLE_TO_TL_START , TMIDDLE_TO_TL_END - , LMIDDLE_TO_L_START - , LMIDDLE_TO_L_END - , LMIDDLE_TO_LL_START , LMIDDLE_TO_LL_END + , RSIDE_TO_R_START + , RSIDE_TO_R_END + , LSIDE_TO_L_START + , LSIDE_TO_L_END +#pragma endregion +#pragma region ORIGIN_HORIZONTAL +#pragma endregion +#pragma region UP_HORIZONTAL +#pragma endregion +#pragma region MIDDLE_HORIZONTAL +#pragma endregion +#pragma region DOWN_HORIZONTAL +#pragma endregion , END }; @@ -107,17 +138,24 @@ enum class PLAYER_JOINT_ROUTE_ORDER { ORIGIN_TO_RUP , ORIGIN_TO_TUP , ORIGIN_TO_LUP + , ORIGIN_TO_RSIDEUP + , ORIGIN_TO_LSIDEUP , RUP_TO_RMIDDLE , TUP_TO_TMIDDLE , LUP_TO_LMIDDLE + , RSIDEUP_TO_RSIDE + , LSIDEUP_TO_LSIDE + , RMIDDLE_TO_RR - , RMIDDLE_TO_R , TMIDDLE_TO_TR , TMIDDLE_TO_TL - , LMIDDLE_TO_L , LMIDDLE_TO_LL + + , RSIDE_TO_R + , LSIDE_TO_L + , END }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin index 401c670b0..a4c4758f5 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19fe722384b732f55bddc9ac5d09f0d50c2a81c76bd7b8c580378f6fa077ca92 -size 10364804 +oid sha256:87c758a2826671b83278e10f317fa5da1f6d9e5f95d18a354e0462b434dd003c +size 10396801 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx index bb404edba..426160853 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32213c93d4cc6a61dd1bfcdb4193bfa76ddb1df6446e1ab1dfeab4d5ff522efd -size 5730924 +oid sha256:01136f9f94eb8740cca6eab949a12b71aafcf8a3c8d095c24d000151702e538e +size 5782684 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin index 84a67412b..b677974e7 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5de12debaa365a050c382275f3f5ea6f0d1837fb91455f97ec7ed6664ca0a125 -size 10647812 +oid sha256:c0340a8a0b08502e6b931b479aca9dae73719a434dbd30d731efea04278e8e7f +size 10680526 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx index 421a1ac9e..e4bffd1e6 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78fb82fcf96c82e6150fcbb64add88abc6bc7c622c4b3eee282fe75c3aaf438e -size 6313116 +oid sha256:f3c4a07825d551440d37c0eb56c56528c5cf729eda1b0e8d961b16ceee36f9aa +size 6535596 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin index 87e386e1e..fd9b2e2d0 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6603be4f8c20ac9d35068a179b14d328d2e3ed8606cbbe4ff485ee20860c0e8 -size 171707390 +oid sha256:9f284800b9984ead6d6492da61715e4b4614da55252049f8afc4ff2a73d634b2 +size 172156085 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx index a9917c355..4290f0588 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4b060e3740116655157dcef4e1c24be46ef19e135bee51f1f226c8e67f92553 -size 483257372 +oid sha256:04af77e6fd573fb448d78a4afccd218b9940479fcaef46e375499a3374a4c326 +size 496538684 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin index d0c17e284..4daef16ff 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d7c2c35f74162db556b2ffc41430330758f2663ff74789a9df08228ed384de7 -size 23075473 +oid sha256:00dd067d5e97d20be5f8e0fbe544ba7018305af8f6b7192a5bbacc1453d37450 +size 23190066 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx index 16f03d476..90c7123a8 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ad3ae0879799efcc14fb85e27aadb253deb42262d583646d59e96e0e4971891 -size 56931356 +oid sha256:546136e613a6efd35ab9db1e22a97373147f20f3b4831ca2ef8a869b94084afa +size 58621516 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin index 4cfeee79b..6445f6267 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d11392338e9b08f59daf4a89c6314c909324db9b8cd12eed44b9d54f0f38024a -size 69331867 +oid sha256:2265a7cb220bc45acf8bec67f8eb3855d48d4a71260f6866277bd93b286286f5 +size 69510580 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx index a6552e63f..a0caadcf2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3852584ae91ce78b9c3299e91ea1639afa69ce3fddb78fa301aec277ecdfd796 -size 182598812 +oid sha256:46bb4f14c6166fcb966998ab1688f933776a5c0bed07bd6278a0f7c3d1f9f5fb +size 187629004 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin index 04d63a307..07b783c00 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5530b986c6bd101b5e3eda8eb5631594b07a071886f7708b69494730193fd8de -size 10807972 +oid sha256:fc989ee8bef63e3c178ea47dc22742580f0a43c254e3bb0328e2e60a4dc66275 +size 10839386 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx index f087a226a..a6a50a1ed 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a95ec0fd1c0b1991083fd21c0fb2a87d6126400acde22ef97a6df438b1c5d3c -size 6401564 +oid sha256:424e5eb5fdf67d1e9ab6d26a22daf433c490ebef787013e31ef934621dc9378f +size 6622524 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin index d005baddb..33eaa83ba 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf4c2fc354b8fe220a85cf2a4766aca198966d2afe06b99ea15b60520b3d600d -size 11563567 +oid sha256:cd9ef6d0085b5b5aa114f93658bd677b2f6e63166c7040a8b0f41d590fd1d598 +size 11599528 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx index 17ee917fe..53d4ae88d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9344cd73993ca5a9979005e4a2d6602afd495ce1a665b6693807ffc8288891bb -size 10960124 +oid sha256:d09ce4044856db084f1c27d202ce2ef8ec39caab390090c39cfea58682335f5e +size 11317660 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin index d3c6afa9c..6d3d26444 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fed83d790ce5ec13ed5cf7acd245ac38b3a86658e52c72d7c8d3424d86d500f7 -size 60651350 +oid sha256:0c2b15b19dbd5e9cac30f8dd7a0503697fefb8ba7670a0517fa76a92f1e39dd9 +size 60872730 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx index e8fc6d273..d334a4453 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c15071ebf86e8c4688d6f252de7b50487cb1454bc5e7ca5231334ac0d5546d64 -size 157682572 +oid sha256:97b6f3b412d2efaee517a4957e733bd10fa4ec2cce0cfc2ab7849f189cac1ab4 +size 162112268 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin index 3f55b79df..78b0c122c 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d369879ae3846d1bb1779818b025a714b9412cb4a7faaa238c6b862f7bdd0ec -size 19489076 +oid sha256:c014c7879bd0bf784b52c41103c914e36ccd342a19fe774d14a76db339b10406 +size 19553373 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx index 8e0194c1e..fdeecd83d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:068105d25b85bbd235d0be09005cfa7d4a2938571965019ad3459dcaa3133360 -size 41111868 +oid sha256:9a0f699ca4bd2b3fc8fe6fa488eb603e57571dcb997d415e3773959bcff3c376 +size 42318204 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin index 8173f74c8..8e2669fc2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97a3468fa1372811a36391ffece957b786dcf633ec84b6bb1ded222e89bca6d9 -size 15496127 +oid sha256:7cd902991cc0e07a13d661ff082063c4d91d05558745e22fd55b6236534657ce +size 15532953 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx index 4f53e5320..cd212311b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c57f4192cd1cc660c7975d3d0c2e73680f55257a48c3d6ef6965e3290b19c0e -size 13271484 +oid sha256:0c6ea3057be2b0b2b79a9f68b04a50c57d2aafd511248eb5f45fbcacae41bf94 +size 13646412 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin index f3654b2ae..6f211a32d 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6cdba1d2a122702abe7704d60fe38a1fed7d33020713ad0478ca5374681651d -size 12209325 +oid sha256:16a8a368648f0a2a465e60be2594f116a9e5c8fd66756f68472f2da90518953b +size 12244771 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx index a2146657d..bd8c2f8b9 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dfdb7b6f61c64274ea30443d94497b20db204a7c9e82154980154b16af194e6d -size 9383916 +oid sha256:4d1815739ab986871b4e43dc9a93594acebd8734f3cb0d18f58ea598e0322479 +size 9683692 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml index d24083c9d..6934e9717 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Monster/SubTroll/troll.xml @@ -173,7 +173,7 @@ - + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl index 27f9a031b..88775ff78 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl @@ -201,7 +201,7 @@ VS_OUT VS_MAIN_LEGACY(VS_IN In) matrix TempBoneMatrix = (matrix) 0; int MinIdx = 30; - int MaxIdx = 41; + int MaxIdx = 45; if (idx.x >= MinIdx && idx.x <= MaxIdx) //g_RobeBoneMask[idx.x] == 1) diff --git a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp index 86d6b9861..e8c5da63e 100644 --- a/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Level_ObjectViewer.cpp @@ -764,8 +764,8 @@ HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag) return E_FAIL; } - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test))) - return E_FAIL; + //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, nullptr, nullptr, &m_Test))) + // return E_FAIL; if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_CUBE))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp index 8c26560ec..9c54c78be 100644 --- a/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader_ObjectViewer.cpp @@ -100,9 +100,9 @@ HRESULT CLoader::Loading_For_ObjectViewer() CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.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(), @@ -206,12 +206,12 @@ HRESULT CLoader::Loading_For_ObjectViewer() return E_FAIL; futures.emplace_back(Deferred_ModelLoad( - MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.fbx", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(), TEXT("Prototype_Component_Playable_Model") )); //futures.emplace_back(Deferred_ModelLoad( - // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(), + // MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Cmbt.fbx", XMMatrixIdentity(), // TEXT("Prototype_Component_Student_Cmbt_Model") //)); diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index b19fbb64d..ff96a4ad3 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -1073,6 +1073,10 @@ PSX::PxD6Joint* CGameInstance::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor { return m_pPhysX_Manager->Create_BasicPxD6Joint(pActor0, pActor1, pxJointWorldPos); } +PSX::PxFixedJoint* CGameInstance::Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos) +{ + return m_pPhysX_Manager->Create_BasicPxFixedJoint(pActor0, pActor0, pxJointWorldPos); +} _bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer) { return m_pPhysX_Manager->SphereCast(fRadius, vStartPos, vDir, fDistance, flagHitsData, flagQuery, hitBuffer); diff --git a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp index a6a4cc748..7a33dd237 100644 --- a/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp +++ b/Jusin154_Team3D/Engine/Private/PhysX_Manager.cpp @@ -169,6 +169,12 @@ PSX::PxJoint* CPhysX_Manager::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActo pOut = pJoint; } break; + case PHYSX_JOINT::FIXED: + { + PSX::PxFixedJoint* pJoint = PSX::PxFixedJointCreate(*m_pPhysics, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1); + pOut = pJoint; + } + break; default: break; } @@ -198,20 +204,6 @@ PSX::PxD6Joint* CPhysX_Manager::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActo pActor1->setSolverIterationCounts(4, 1); #endif // 기무리 - pJoint->setMotion(PSX::PxD6Axis::eX, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eY, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eZ, PSX::PxD6Motion::eLOCKED); - pJoint->setMotion(PSX::PxD6Axis::eTWIST, PSX::PxD6Motion::eLIMITED); - pJoint->setMotion(PSX::PxD6Axis::eSWING1, PSX::PxD6Motion::eLIMITED); - pJoint->setMotion(PSX::PxD6Axis::eSWING2, PSX::PxD6Motion::eLIMITED); - - - pJoint->setTwistLimit(PSX::PxJointAngularLimitPair(-XMConvertToRadians(1.f), XMConvertToRadians(1.f))); // 20도 - pJoint->setSwingLimit(PSX::PxJointLimitCone(XMConvertToRadians(1.f), XMConvertToRadians(1.f))); - - pJoint->setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(50.0f, 100.0f, FLT_MAX, true)); - pJoint->setDrivePosition(PSX::PxTransform(PSX::PxIdentity)); //생성 시 프레임 기준 - pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true); pJoint->setConstraintFlag(PSX::PxConstraintFlag::eIMPROVED_SLERP, true); pJoint->setConstraintFlag(PSX::PxConstraintFlag::eCOLLISION_ENABLED, false); @@ -220,6 +212,23 @@ PSX::PxD6Joint* CPhysX_Manager::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActo return pJoint; } +PSX::PxFixedJoint* CPhysX_Manager::Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos) +{ + const PSX::PxTransform pxWorldParentPos = pActor0->getGlobalPose(); + const PSX::PxTransform pxWorldChildPos = pActor1->getGlobalPose(); + + const PSX::PxTransform pxLocalParentPOs = pxWorldParentPos.transformInv(pxJointWorldPos); + const PSX::PxTransform pxLocalChildPos = pxWorldChildPos.transformInv(pxJointWorldPos); + + PSX::PxFixedJoint* pJoint = PSX::PxFixedJointCreate(*m_pPhysics, pActor0, pxLocalParentPOs, pActor1, pxLocalChildPos); + + pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true); + pJoint->setConstraintFlag(PSX::PxConstraintFlag::eCOLLISION_ENABLED, false); + + pJoint->setBreakForce(1e30f, 1e30f); + return pJoint; +} + PSX::PxMaterial* CPhysX_Manager::Create_Material(const _float3* vMatInfo) { PSX::PxMaterial* pPxMaterial = m_pPhysics->createMaterial(vMatInfo->x, vMatInfo->y, vMatInfo->z); diff --git a/Jusin154_Team3D/Engine/Public/Engine_Enum.h b/Jusin154_Team3D/Engine/Public/Engine_Enum.h index 0677fe0b0..592d6b08a 100644 --- a/Jusin154_Team3D/Engine/Public/Engine_Enum.h +++ b/Jusin154_Team3D/Engine/Public/Engine_Enum.h @@ -122,6 +122,7 @@ enum class PHYSX_JOINT { D6, DISTANCE, REVOLUTE, + FIXED, END }; diff --git a/Jusin154_Team3D/Engine/Public/GameInstance.h b/Jusin154_Team3D/Engine/Public/GameInstance.h index 748f6d6e3..93c09817e 100644 --- a/Jusin154_Team3D/Engine/Public/GameInstance.h +++ b/Jusin154_Team3D/Engine/Public/GameInstance.h @@ -220,6 +220,7 @@ class ENGINE_DLL CGameInstance final : public CBase PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel); PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1); PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); + PSX::PxFixedJoint* Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); _bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); _bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer); diff --git a/Jusin154_Team3D/Engine/Public/Model.h b/Jusin154_Team3D/Engine/Public/Model.h index 7f6ef92b9..700274b36 100644 --- a/Jusin154_Team3D/Engine/Public/Model.h +++ b/Jusin154_Team3D/Engine/Public/Model.h @@ -197,7 +197,7 @@ class ENGINE_DLL CModel final : public CComponent _float m_fRatio = {}; _int m_iCurrSecondAnimIndex = { -1 }; - _int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1,-1,-1,-1,-1 }; + _int m_iBoneIndex[ENUM_CLASS(BLEND_BONE::END)] = { -1,-1,-1,-1, -1,-1,-1,-1 }; vector> m_BoneMask; vector<_bool> m_CPUBoneMask; diff --git a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h index 2d2d57264..caa617918 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX_Manager.h +++ b/Jusin154_Team3D/Engine/Public/PhysX_Manager.h @@ -37,6 +37,7 @@ class CPhysX_Manager final : public CBase // https://documentation.help/nvidia-physx-sdk-guide/Joints.html PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1); PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); + PSX::PxFixedJoint* Create_BasicPxFixedJoint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos); void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh, _uint iLevel); void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel);