PhysicsID/RigidBody: Add GetWorld() accessor

This commit is contained in:
Jérôme Leclercq
2017-07-25 14:44:30 +02:00
parent 28e8377708
commit b00487c88c
4 changed files with 13 additions and 1 deletions

View File

@@ -191,6 +191,11 @@ namespace Nz
return Vector2f(static_cast<float>(vel.x), static_cast<float>(vel.y));
}
PhysWorld2D* RigidBody2D::GetWorld() const
{
return m_world;
}
bool RigidBody2D::IsMoveable() const
{
return m_mass > 0.f;

View File

@@ -204,6 +204,11 @@ namespace Nz
return velocity;
}
PhysWorld3D* RigidBody3D::GetWorld() const
{
return m_world;
}
bool RigidBody3D::IsAutoSleepEnabled() const
{
return NewtonBodyGetAutoSleep(m_body) != 0;
@@ -314,7 +319,7 @@ namespace Nz
NazaraUnused(userData);
NewtonBodySetSleepState(body, 0);
return 1;
},
},
nullptr);
}
}