added 'getConstraintSolver' and ability to 'reset' (set randseeds back to zero, and clear internal caches)
This commit is contained in:
@@ -35,8 +35,12 @@ public:
|
||||
|
||||
virtual ~btConstraintSolver() {}
|
||||
|
||||
///solve a group of constraints
|
||||
virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc) = 0;
|
||||
|
||||
///clear internal cached data and reset random seed
|
||||
virtual void reset() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1156,3 +1156,10 @@ btScalar btSequentialImpulseConstraintSolver::solveFriction(btRigidBody* body0,b
|
||||
}
|
||||
return btScalar(0.);
|
||||
}
|
||||
|
||||
|
||||
void btSequentialImpulseConstraintSolver::reset()
|
||||
{
|
||||
m_btSeed2 = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ public:
|
||||
|
||||
virtual btScalar solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
|
||||
|
||||
///clear internal cached data and reset random seed
|
||||
virtual void reset();
|
||||
|
||||
btScalar solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user