Exemplo n.º 1
0
        public void ComputeOldWorldManifold(out Vector2 normal, out IList <WorldPoint> points)
        {
            if (OldManifold.PointCount < 1)
            {
                normal = Vector2.Zero;
                points = new FixedArray2 <WorldPoint>();
                return;
            }

            var bodyA      = Contact.FixtureA.Body;
            var bodyB      = Contact.FixtureB.Body;
            var transformA = bodyA.Transform;
            var transformB = bodyB.Transform;
            var radiusA    = Contact.FixtureA.Radius;
            var radiusB    = Contact.FixtureB.Radius;

            FixedArray2 <WorldPoint> worldPoints;

            OldManifold.ComputeWorldManifold(
                transformA,
                radiusA,
                transformB,
                radiusB,
                out normal,
                out worldPoints);
            worldPoints.Count = OldManifold.PointCount;
            points            = worldPoints;
        }