Remove physics world body notification bus (#576)
This commit is contained in:
@@ -138,7 +138,7 @@ namespace PhysXEditorTests
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
|
||||
// since there was no editor rigid body component, the runtime entity should have a static rigid body
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
const auto* pxRigidStatic = static_cast<const physx::PxRigidStatic*>(staticBody->GetNativePointer());
|
||||
|
||||
PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene());
|
||||
@@ -196,7 +196,7 @@ namespace PhysXEditorTests
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
|
||||
// since there was no editor rigid body component, the runtime entity should have a static rigid body
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
const auto* pxRigidStatic = static_cast<const physx::PxRigidStatic*>(staticBody->GetNativePointer());
|
||||
|
||||
PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene());
|
||||
@@ -247,7 +247,7 @@ namespace PhysXEditorTests
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
|
||||
// since there was no editor rigid body component, the runtime entity should have a static rigid body
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
|
||||
// the vertices of the input polygon prism ranged from (0, 0) to (3, 3) and the height was set to 2
|
||||
// the bounding box of the static rigid body should reflect those values combined with the scale values above
|
||||
@@ -291,7 +291,7 @@ namespace PhysXEditorTests
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
|
||||
// since there was no editor rigid body component, the runtime entity should have a static rigid body
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
const auto* pxRigidStatic = static_cast<const physx::PxRigidStatic*>(staticBody->GetNativePointer());
|
||||
|
||||
PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene());
|
||||
@@ -363,7 +363,7 @@ namespace PhysXEditorTests
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
|
||||
// since there was no editor rigid body component, the runtime entity should have a static rigid body
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
const auto* pxRigidStatic = static_cast<const physx::PxRigidStatic*>(staticBody->GetNativePointer());
|
||||
|
||||
PHYSX_SCENE_READ_LOCK(pxRigidStatic->getScene());
|
||||
@@ -442,7 +442,7 @@ namespace PhysXEditorTests
|
||||
|
||||
// make a game entity and check its bounding box is consistent with the changed transform
|
||||
EntityPtr gameEntity = CreateActiveGameEntityFromEditorEntity(editorEntity.get());
|
||||
const auto* staticBody = gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetStaticRigidBody();
|
||||
const auto* staticBody = azdynamic_cast<PhysX::StaticRigidBody*>(gameEntity->FindComponent<PhysX::StaticRigidBodyComponent>()->GetSimulatedBody());
|
||||
AZ::Aabb aabb = staticBody->GetAabb();
|
||||
EXPECT_TRUE(aabb.GetMax().IsClose(translation + 0.5f * scale * boxDimensions));
|
||||
EXPECT_TRUE(aabb.GetMin().IsClose(translation - 0.5f * scale * boxDimensions));
|
||||
|
||||
Reference in New Issue
Block a user