move erp for deformable into a separate parameter
This commit is contained in:
@@ -162,9 +162,9 @@ void SplitImpulse::initPhysics()
|
||||
}
|
||||
|
||||
#ifdef USE_SPLIT_IMPULSE
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_erp = 0.03;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_deformable_erp = 0.03;
|
||||
#else
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_erp = 0.0;
|
||||
getDeformableDynamicsWorld()->getSolverInfo().m_deformable_erp = 0.0;
|
||||
#endif
|
||||
|
||||
// create a piece of cloth
|
||||
|
||||
@@ -46,6 +46,7 @@ struct btContactSolverInfoData
|
||||
btScalar m_sor; //successive over-relaxation term
|
||||
btScalar m_erp; //error reduction for non-contact constraints
|
||||
btScalar m_erp2; //error reduction for contact constraints
|
||||
btScalar m_deformable_erp; //error reduction for deformable constraints
|
||||
btScalar m_globalCfm; //constraint force mixing for contacts and non-contacts
|
||||
btScalar m_frictionERP; //error reduction for friction constraints
|
||||
btScalar m_frictionCFM; //constraint force mixing for friction constraints
|
||||
@@ -81,6 +82,7 @@ struct btContactSolverInfo : public btContactSolverInfoData
|
||||
m_numIterations = 10;
|
||||
m_erp = btScalar(0.2);
|
||||
m_erp2 = btScalar(0.2);
|
||||
m_deformable_erp = btScalar(0.);
|
||||
m_globalCfm = btScalar(0.);
|
||||
m_frictionERP = btScalar(0.2); //positional friction 'anchors' are disabled by default
|
||||
m_frictionCFM = btScalar(0.);
|
||||
|
||||
@@ -59,7 +59,7 @@ void btDeformableContactProjection::splitImpulseSetup(const btContactSolverInfo&
|
||||
btAlignedObjectArray<btDeformableNodeRigidContactConstraint>& constraints = *m_nodeRigidConstraints.getAtIndex(index);
|
||||
for (int i = 0; i < constraints.size(); ++i)
|
||||
{
|
||||
constraints[i].setPenetrationScale(infoGlobal.m_erp);
|
||||
constraints[i].setPenetrationScale(infoGlobal.m_deformable_erp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ void btDeformableContactProjection::splitImpulseSetup(const btContactSolverInfo&
|
||||
for (int index = 0; index < m_allFaceConstraints.size(); ++index)
|
||||
{
|
||||
btDeformableContactConstraint* constraint = m_allFaceConstraints[index];
|
||||
constraint->setPenetrationScale(infoGlobal.m_erp);
|
||||
constraint->setPenetrationScale(infoGlobal.m_deformable_erp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user