Update PhysicsSystem2D (#179)
* Update * Add: [Get/Set]AngularDaming for standardization * Fix: Name error * Add: [Get/Set][AngularDamping/MomentOfInertia] in PhysicsComponent2D * Forgot in last commit * Add: param coordSys in [PhysicsComponent2D/RigidBody2D]::SetMassCenter * Add: Some forgotten inline * Fix little error * Fix: Indentation before case * Move and Change GetCenterOfGravity * Rename m_world into m_physWorld * Rename GetWorld int GetPhysWorld * Update: PhysicsSystem2D became an interface of PhysWorld2D * Update Collison/PhysicsComponent because GetWorld was renamed * Update tests * Update: Make the interface usable with Entity instead of PhysicsComponent * Update: Make GetPhysWorld private * Update PhysicsSystem2D.hpp * Update: indent * Remove: useless blank line * update order(?) * Update PhysicsSystem2D.hpp
This commit is contained in:
@@ -21,7 +21,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
Ndk::PhysicsComponent2D& physicsComponent2D = movingEntity->AddComponent<Ndk::PhysicsComponent2D>();
|
||||
|
||||
world.GetSystem<Ndk::PhysicsSystem2D>().SetMaximumUpdateRate(0.f);
|
||||
world.GetSystem<Ndk::PhysicsSystem2D>().GetWorld().SetMaxStepCount(std::numeric_limits<std::size_t>::max());
|
||||
world.GetSystem<Ndk::PhysicsSystem2D>().SetMaxStepCount(std::numeric_limits<std::size_t>::max());
|
||||
|
||||
WHEN("We update the world")
|
||||
{
|
||||
@@ -100,7 +100,7 @@ SCENARIO("PhysicsSystem2D", "[NDK][PHYSICSSYSTEM2D]")
|
||||
|
||||
WHEN("We put a force on it")
|
||||
{
|
||||
float stepSize = world.GetSystem<Ndk::PhysicsSystem2D>().GetWorld().GetStepSize();
|
||||
float stepSize = world.GetSystem<Ndk::PhysicsSystem2D>().GetStepSize();
|
||||
Nz::Vector2f velocity = Nz::Vector2f::UnitX();
|
||||
physicsComponent2D.AddForce(velocity / stepSize);
|
||||
world.Update(1.f);
|
||||
|
||||
Reference in New Issue
Block a user