Aloush154 / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

Proposal to extend ERP settings in btContactSolverInfoData #771

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

Attachments:

GoogleCodeExporter commented 8 years ago
moved to https://github.com/bulletphysics/bullet3/issues/75

Original comment by erwin.coumans on 30 Mar 2014 at 5:38