public GetWorldManifold ( Box2DX.Collision.WorldManifold &worldManifold ) : void | ||
worldManifold | Box2DX.Collision.WorldManifold | |
return | void |
// Callbacks for derived classes. public override void PreSolve(Contact contact, Manifold oldManifold) { Manifold manifold = contact.GetManifold(); if (manifold.PointCount == 0) { return; } Fixture fixtureA = contact.GetFixtureA(); Fixture fixtureB = contact.GetFixtureB(); PointState[] state1 = new PointState[Box2DX.Common.Settings.MaxManifoldPoints]; PointState[] state2 = new PointState[Box2DX.Common.Settings.MaxManifoldPoints]; Collision.GetPointStates(state1, state2, oldManifold, manifold); WorldManifold worldManifold; contact.GetWorldManifold(out worldManifold); for (int i = 0; i < manifold.PointCount && _pointCount < k_maxContactPoints; ++i) { ContactPoint cp = _points[_pointCount]; cp.fixtureA = fixtureA; cp.fixtureB = fixtureB; cp.position = worldManifold.Points[i]; cp.normal = worldManifold.Normal; cp.state = state2[i]; _points[_pointCount] = cp; ++_pointCount; } }