fix bugs introduced in merging
This commit is contained in:
@@ -117,23 +117,6 @@ public:
|
||||
|
||||
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()
|
||||
|
||||
@@ -131,15 +131,6 @@ void btDeformableRigidDynamicsWorld::positionCorrection(btScalar timeStep)
|
||||
// only perform position correction when penetrating
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user