behdad / box2d

Automatically exported from code.google.com/p/box2d
2 stars 12 forks source link

Maybe it is not a bug. It is just strange #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The 2 function are totally same in pricinpal:

bool b2ContactSolver::SolvePositionConstraints 
b2ContactSolver::SolveTOIPositionConstraints

Original issue reported on code.google.com by Tapir....@gmail.com on 19 Nov 2010 at 8:15

GoogleCodeExporter commented 9 years ago
I checked the functions. They are different.

Original comment by erinca...@gmail.com on 27 Mar 2011 at 9:43

GoogleCodeExporter commented 9 years ago
The only difference is this block in SolveTOIPositionConstraints:
...
                float32 massA = 0.0f;
                if (bodyA == toiBodyA || bodyA == toiBodyB)
                {
                        massA = bodyA->m_mass;
                }

                float32 massB = 0.0f;
                if (bodyB == toiBodyA || bodyB == toiBodyB)
                {
                        massB = bodyB->m_mass;
                }
...

But neither massA nor massB are used after that.

Original comment by sir...@gmail.com on 14 May 2011 at 5:45