Add methods to query number of solver iterations in DynamicsWorld
This commit is contained in:
parent
82f6bf2dbb
commit
39b7883462
|
@ -189,9 +189,15 @@ class DynamicsWorld : public CollisionWorld {
|
|||
/// Update the physics simulation
|
||||
void update(decimal timeStep);
|
||||
|
||||
/// Get the number of iterations for the velocity constraint solver
|
||||
uint getNbIterationsVelocitySolver() const;
|
||||
|
||||
/// Set the number of iterations for the velocity constraint solver
|
||||
void setNbIterationsVelocitySolver(uint nbIterations);
|
||||
|
||||
/// Get the number of iterations for the position constraint solver
|
||||
uint getNbIterationsPositionSolver() const;
|
||||
|
||||
/// Set the number of iterations for the position constraint solver
|
||||
void setNbIterationsPositionSolver(uint nbIterations);
|
||||
|
||||
|
@ -305,7 +311,12 @@ inline void DynamicsWorld::resetBodiesForceAndTorque() {
|
|||
(*it)->mExternalForce.setToZero();
|
||||
(*it)->mExternalTorque.setToZero();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get the number of iterations for the velocity constraint solver
|
||||
inline uint DynamicsWorld::getNbIterationsVelocitySolver() const {
|
||||
return mNbVelocitySolverIterations;
|
||||
}
|
||||
|
||||
// Set the number of iterations for the velocity constraint solver
|
||||
/**
|
||||
|
@ -315,6 +326,11 @@ inline void DynamicsWorld::setNbIterationsVelocitySolver(uint nbIterations) {
|
|||
mNbVelocitySolverIterations = nbIterations;
|
||||
}
|
||||
|
||||
// Get the number of iterations for the position constraint solver
|
||||
inline uint DynamicsWorld::getNbIterationsPositionSolver() const {
|
||||
return mNbPositionSolverIterations;
|
||||
}
|
||||
|
||||
// Set the number of iterations for the position constraint solver
|
||||
/**
|
||||
* @param nbIterations Number of iterations for the position solver
|
||||
|
|
Loading…
Reference in New Issue
Block a user