public void PostSolve(Contact contact, ref ContactImpulse impulse) { Body[] bodies = new Body[2]; bodies[0] = contact.GetFixtureA().GetBody(); bodies[1] = contact.GetFixtureB().GetBody(); mBodies.Add(bodies); if (mBodies.Count > 10000) { mBodies.Clear(); Console.WriteLine("Clear contacts."); } }
public void Report(ContactConstraint[] constraints) { if (_listener == null) { return; } for (int i = 0; i < _contactCount; ++i) { Contact c = _contacts[i]; ContactConstraint cc = constraints[i]; ContactImpulse impulse = new ContactImpulse(); for (int j = 0; j < cc.pointCount; ++j) { impulse.normalImpulses[j] = cc.points[j].normalImpulse; impulse.tangentImpulses[j] = cc.points[j].tangentImpulse; } _listener.PostSolve(c, ref impulse); } }
public void PostSolve(Contact contact, ref ContactImpulse impulse) { }
/// <summary> /// This is one the methods of the IContactListener interface. /// No implementation. /// </summary> /// <param name="contact">Box2D Contact</param> /// <param name="impulse">Box2D ContactImpulse</param> public void PostSolve(Contact contact, ref ContactImpulse impulse) { }