add option to turn face contact on/off

This commit is contained in:
Xuchen Han
2019-10-14 15:21:58 -07:00
parent 05c25a27de
commit 774937bcd6
4 changed files with 23 additions and 16 deletions

View File

@@ -88,8 +88,6 @@ void btDeformableMultiBodyDynamicsWorld::softBodySelfCollision()
void btDeformableMultiBodyDynamicsWorld::integrateTransforms(btScalar timeStep)
{
BT_PROFILE("integrateTransforms");
//m_deformableBodySolver->backupVelocity();
//positionCorrection(timeStep); // looks like position correction is no longer necessary
btMultiBodyDynamicsWorld::integrateTransforms(timeStep);
for (int i = 0; i < m_softBodies.size(); ++i)
{
@@ -116,16 +114,12 @@ void btDeformableMultiBodyDynamicsWorld::integrateTransforms(btScalar timeStep)
}
psb->interpolateRenderMesh();
}
//m_deformableBodySolver->revertVelocity();
}
void btDeformableMultiBodyDynamicsWorld::solveConstraints(btScalar timeStep)
{
if (!m_implicit)
{
// save v_{n+1}^* velocity after explicit forces
m_deformableBodySolver->backupVelocity();
}
// save v_{n+1}^* velocity after explicit forces
m_deformableBodySolver->backupVelocity();
// set up constraints among multibodies and between multibodies and deformable bodies
setupConstraints();