Physics2D/PhysWorld2D: Add iteration count control
This commit is contained in:
@@ -144,6 +144,11 @@ namespace Nz
|
||||
return m_handle;
|
||||
}
|
||||
|
||||
std::size_t PhysWorld2D::GetIterationCount() const
|
||||
{
|
||||
return cpSpaceGetIterations(m_handle);
|
||||
}
|
||||
|
||||
float PhysWorld2D::GetStepSize() const
|
||||
{
|
||||
return m_stepSize;
|
||||
@@ -281,6 +286,11 @@ namespace Nz
|
||||
cpSpaceSetGravity(m_handle, cpv(gravity.x, gravity.y));
|
||||
}
|
||||
|
||||
void PhysWorld2D::SetIterationCount(std::size_t iterationCount)
|
||||
{
|
||||
cpSpaceSetIterations(m_handle, int(iterationCount));
|
||||
}
|
||||
|
||||
void PhysWorld2D::SetStepSize(float stepSize)
|
||||
{
|
||||
m_stepSize = stepSize;
|
||||
|
||||
Reference in New Issue
Block a user