Physics3D/RigidBody3D: Add simulation property
This commit is contained in:
@@ -133,6 +133,11 @@ namespace Nz
|
||||
NewtonBodySetAutoSleep(m_body, autoSleep);
|
||||
}
|
||||
|
||||
void RigidBody3D::EnableSimulation(bool simulation)
|
||||
{
|
||||
NewtonBodySetSimulationState(m_body, simulation);
|
||||
}
|
||||
|
||||
Boxf RigidBody3D::GetAABB() const
|
||||
{
|
||||
Vector3f min, max;
|
||||
@@ -238,6 +243,11 @@ namespace Nz
|
||||
return m_mass > 0.f;
|
||||
}
|
||||
|
||||
bool RigidBody3D::IsSimulationEnabled() const
|
||||
{
|
||||
return NewtonBodyGetSimulationState(m_body) != 0;
|
||||
}
|
||||
|
||||
bool RigidBody3D::IsSleeping() const
|
||||
{
|
||||
return NewtonBodyGetSleepState(m_body) != 0;
|
||||
|
||||
Reference in New Issue
Block a user