|
Blender V4.3
|
#include <btDiscreteDynamicsWorldMt.h>
Inherits btConstraintSolver.
Public Member Functions | |
| btConstraintSolverPoolMt (int numSolvers) | |
| btConstraintSolverPoolMt (btConstraintSolver **solvers, int numSolvers) | |
| virtual | ~btConstraintSolverPoolMt () |
| virtual btScalar | solveGroup (btCollisionObject **bodies, int numBodies, btPersistentManifold **manifolds, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &info, btIDebugDraw *debugDrawer, btDispatcher *dispatcher) BT_OVERRIDE |
| solve a group of constraints | |
| virtual void | reset () BT_OVERRIDE |
| clear internal cached data and reset random seed | |
| virtual btConstraintSolverType | getSolverType () const BT_OVERRIDE |
Public Member Functions inherited from btConstraintSolver | |
| virtual | ~btConstraintSolver () |
| virtual void | prepareSolve (int, int) |
| virtual void | allSolved (const btContactSolverInfo &, class btIDebugDraw *) |
btConstraintSolverPoolMt - masquerades as a constraint solver, but really it is a threadsafe pool of them.
Each solver in the pool is protected by a mutex. When solveGroup is called from a thread, the pool looks for a solver that isn't being used by another thread, locks it, and dispatches the call to the solver. So long as there are at least as many solvers as there are hardware threads, it should never need to spin wait.
Definition at line 32 of file btDiscreteDynamicsWorldMt.h.
|
explicit |
Definition at line 87 of file btDiscreteDynamicsWorldMt.cpp.
References btSequentialImpulseConstraintSolver(), init(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::reserve().
| btConstraintSolverPoolMt::btConstraintSolverPoolMt | ( | btConstraintSolver ** | solvers, |
| int | numSolvers ) |
Definition at line 100 of file btDiscreteDynamicsWorldMt.cpp.
References init().
|
virtual |
Definition at line 105 of file btDiscreteDynamicsWorldMt.cpp.
References NULL, and btAlignedObjectArray< T >::size().
|
inlinevirtual |
Implements btConstraintSolver.
Definition at line 55 of file btDiscreteDynamicsWorldMt.h.
|
virtual |
clear internal cached data and reset random seed
Implements btConstraintSolver.
Definition at line 133 of file btDiscreteDynamicsWorldMt.cpp.
References btSpinMutex::lock(), btConstraintSolver::reset(), btAlignedObjectArray< T >::size(), and btSpinMutex::unlock().
|
virtual |
solve a group of constraints
Implements btConstraintSolver.
Definition at line 117 of file btDiscreteDynamicsWorldMt.cpp.
References constraints, numBodies, numConstraints, numManifolds, btConstraintSolver::solveGroup(), and btSpinMutex::unlock().