Proposal to extend ERP settings in btContactSolverInfoData with a new one
dedicated to be the default for user constraints, and to rename already
existing ERP-s in btContactSolverInfoData for better understandability.
We needed a way to set the "contact" ERP used when a collision occurs (without
split impulse) different from the default ERP of the user constraints. These 2
used the same m_erp member of btContactSolverInfo. E.g.:
btSequentialImpulseConstraintSolver::setupContactConstraint
...
if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
{
erp = infoGlobal.m_erp;
}
...
btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup
...
info2.erp = infoGlobal.m_erp;
...
To solve this problem we introduced a new member to btContactSolverInfoData
(btContactSolverInfo), m_jointERP. Maybe it is also useful for others.
During this small extension we also changed the name of
- the m_erp member of btContactSolverInfoData to m_marginErp and
- the m_erp2 member of btContactSolverInfoData to m_splitImpulseErp.
We think that this will improve the understandability of the code.
What is your opinion about that?
Patch included.
Patch is provided for revision 2712.
Original issue reported on code.google.com by nsark...@gmail.com on 20 Nov 2013 at 3:41
Original issue reported on code.google.com by
nsark...@gmail.com
on 20 Nov 2013 at 3:41Attachments: