[add] PhysicsBase Actors
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "Mouse_Manager.h"
|
||||
#include "Collider_Manager.h"
|
||||
#include "Picking.h"
|
||||
#include "PhysX_Manager.h"
|
||||
|
||||
IMPLEMENT_SINGLETON(CGameInstance)
|
||||
|
||||
@@ -89,6 +90,10 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
if (nullptr == m_pCollider_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pPhysX_Manager = CPhysX_Manager::Create(*ppDevice, *ppContext);
|
||||
if (nullptr == m_pPhysX_Manager) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -112,6 +117,7 @@ void CGameInstance::Update_Engine(_float fTimeDelta)
|
||||
|
||||
m_pLevel_Manager->Update(fTimeDelta);
|
||||
m_pObject_Manager->Clear_DeadObj();
|
||||
m_pPhysX_Manager->Update(fTimeDelta);
|
||||
//m_pObstacle_Manager->Refresh_Region();
|
||||
}
|
||||
|
||||
@@ -513,12 +519,39 @@ _bool CGameInstance::SaveAssimpModel(const _char* filename)
|
||||
auto iter = m_ModelMap.find(filename);
|
||||
return iter->second->SaveAssimpModel(filename);
|
||||
}
|
||||
<<<<<<< Updated upstream
|
||||
#endif
|
||||
SaveModel* CGameInstance::Load_SaveModel(const _char* filePath)
|
||||
{
|
||||
auto iter = m_sModelMap.find(filePath);
|
||||
return &iter->second;
|
||||
}
|
||||
=======
|
||||
|
||||
#pragma region PhysX_Manager
|
||||
PSX::PxMaterial* CGameInstance::Get_Material(_float3& vMatInfo)
|
||||
{
|
||||
return m_pPhysX_Manager->Get_Material(vMatInfo);
|
||||
}
|
||||
HRESULT CGameInstance::Create_TriangleMesh(const _wstring& wstrMeshKey, CMesh* pMesh)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_TriangleMesh(wstrMeshKey, pMesh);
|
||||
}
|
||||
PSX::PxShape* CGameInstance::Create_Shape(ACTOR eType, _float3& vhalfGeometryInfo, PSX::PxMaterial& pxMaterial, _bool bExclusive, PSX::PxShapeFlags ePxShapeFlag)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_Shape(eType, vhalfGeometryInfo, pxMaterial, bExclusive, ePxShapeFlag);
|
||||
}
|
||||
const PSX::PxRigidDynamic* CGameInstance::Add_DynamicActor(CRigidBody& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_DynamicActor(RigidBody);
|
||||
}
|
||||
const PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody& RigidBody)
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody);
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
bool CGameInstance::Key_Pressing(int _iKey)
|
||||
{
|
||||
if (false == (GUI::IsWindowFocused(ImGuiFocusedFlags_AnyWindow))) {
|
||||
@@ -626,6 +659,7 @@ void CGameInstance::Release_Engine()
|
||||
{
|
||||
DestroyInstance();
|
||||
|
||||
SAFE_RELEASE(m_pPhysX_Manager);
|
||||
SAFE_RELEASE(m_pPicking);
|
||||
SAFE_RELEASE(m_pCollider_Manager);
|
||||
SAFE_RELEASE(m_pShadow);
|
||||
|
||||
Reference in New Issue
Block a user