Physics3D: Rename PhysObject to RigidBody3D

This commit is contained in:
Lynix
2016-10-13 08:06:14 +02:00
parent 3c4d084b27
commit 3765cba046
9 changed files with 74 additions and 77 deletions

View File

@@ -58,7 +58,7 @@ namespace Ndk
NazaraAssert(entityWorld->HasSystem<PhysicsSystem>(), "World must have a physics system");
Nz::PhysWorld& physWorld = entityWorld->GetSystem<PhysicsSystem>().GetWorld();
m_staticBody.reset(new Nz::PhysObject(&physWorld, m_geom));
m_staticBody.reset(new Nz::RigidBody3D(&physWorld, m_geom));
m_staticBody->EnableAutoSleep(false);
}

View File

@@ -41,7 +41,7 @@ namespace Ndk
else
matrix.MakeIdentity();
m_object.reset(new Nz::PhysObject(&world, geom, matrix));
m_object.reset(new Nz::RigidBody3D(&world, geom, matrix));
m_object->SetMass(1.f);
}

View File

@@ -83,7 +83,7 @@ namespace Ndk
NodeComponent& node = entity->GetComponent<NodeComponent>();
PhysicsComponent& phys = entity->GetComponent<PhysicsComponent>();
Nz::PhysObject& physObj = phys.GetPhysObject();
Nz::RigidBody3D& physObj = phys.GetPhysObject();
node.SetRotation(physObj.GetRotation(), Nz::CoordSys_Global);
node.SetPosition(physObj.GetPosition(), Nz::CoordSys_Global);
}
@@ -94,7 +94,7 @@ namespace Ndk
CollisionComponent& collision = entity->GetComponent<CollisionComponent>();
NodeComponent& node = entity->GetComponent<NodeComponent>();
Nz::PhysObject* physObj = collision.GetStaticBody();
Nz::RigidBody3D* physObj = collision.GetStaticBody();
Nz::Quaternionf oldRotation = physObj->GetRotation();
Nz::Vector3f oldPosition = physObj->GetPosition();