Physics/PhysWorld3D: Add [Get|Set]ThreadCount
This commit is contained in:
parent
a870954762
commit
01ccca433d
|
|
@ -45,11 +45,13 @@ namespace Nz
|
|||
int GetMaterial(const String& name);
|
||||
std::size_t GetMaxStepCount() const;
|
||||
float GetStepSize() const;
|
||||
unsigned int GetThreadCount() const;
|
||||
|
||||
void SetGravity(const Vector3f& gravity);
|
||||
void SetMaxStepCount(std::size_t maxStepCount);
|
||||
void SetSolverModel(unsigned int model);
|
||||
void SetStepSize(float stepSize);
|
||||
void SetThreadCount(unsigned int threadCount);
|
||||
|
||||
void SetMaterialCollisionCallback(int firstMaterial, int secondMaterial, AABBOverlapCallback aabbOverlapCallback, CollisionCallback collisionCallback);
|
||||
void SetMaterialDefaultCollidable(int firstMaterial, int secondMaterial, bool collidable);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,11 @@ namespace Nz
|
|||
return m_stepSize;
|
||||
}
|
||||
|
||||
unsigned int PhysWorld3D::GetThreadCount() const
|
||||
{
|
||||
return NewtonGetThreadsCount(m_world);
|
||||
}
|
||||
|
||||
void PhysWorld3D::SetGravity(const Vector3f& gravity)
|
||||
{
|
||||
m_gravity = gravity;
|
||||
|
|
@ -96,6 +101,11 @@ namespace Nz
|
|||
m_stepSize = stepSize;
|
||||
}
|
||||
|
||||
void PhysWorld3D::SetThreadCount(unsigned int threadCount)
|
||||
{
|
||||
NewtonSetThreadsCount(m_world, threadCount);
|
||||
}
|
||||
|
||||
void PhysWorld3D::SetMaterialCollisionCallback(int firstMaterial, int secondMaterial, AABBOverlapCallback aabbOverlapCallback, CollisionCallback collisionCallback)
|
||||
{
|
||||
static_assert(sizeof(UInt64) >= 2 * sizeof(int), "Oops");
|
||||
|
|
|
|||
Loading…
Reference in New Issue