fix bugs introduced in merging

This commit is contained in:
Xuchen Han
2019-08-15 17:18:45 -07:00
parent 10cb0c368d
commit df7f216bf8
2 changed files with 0 additions and 26 deletions

View File

@@ -117,23 +117,6 @@ public:
virtual void addScaledForceDifferential(btScalar scale, const TVStack& dv, TVStack& df) virtual void addScaledForceDifferential(btScalar scale, const TVStack& dv, TVStack& df)
{ {
// implicit damping force differential
for (int i = 0; i < m_softBodies.size(); ++i)
{
const btSoftBody* psb = m_softBodies[i];
btScalar scaled_k_damp = psb->m_dampingCoefficient * scale;
for (int j = 0; j < psb->m_links.size(); ++j)
{
const btSoftBody::Link& link = psb->m_links[j];
btSoftBody::Node* node1 = link.m_n[0];
btSoftBody::Node* node2 = link.m_n[1];
size_t id1 = node1->index;
size_t id2 = node2->index;
btVector3 local_scaled_df = scaled_k_damp * (dv[id2] - dv[id1]);
df[id1] += local_scaled_df;
df[id2] -= local_scaled_df;
}
}
} }
virtual btDeformableLagrangianForceType getForceType() virtual btDeformableLagrangianForceType getForceType()

View File

@@ -131,15 +131,6 @@ void btDeformableRigidDynamicsWorld::positionCorrection(btScalar timeStep)
// only perform position correction when penetrating // only perform position correction when penetrating
if (dp < 0) if (dp < 0)
{ {
if (constraint.m_static[j] == true)
{
if (friction.m_static[j] == true)
{
c->m_node->m_v = va;
}
c->m_node->m_v -= dp * cti.m_normal / timeStep;
c->m_node->m_v = va;
}
c->m_node->m_v -= dp * cti.m_normal / timeStep; c->m_node->m_v -= dp * cti.m_normal / timeStep;
} }
} }