// Recursive implementation of the EPA loop.
        // Each recursion adds a point to the convex hull until it's known that we have the closest point on the surface.
        public static ClosestPoints EPARecurse(ref SupportContext ctx, int count, MinkowskiPoint[] hull, int iteration)
        {
            int   mini    = 0;
            float minDist = cp.Infinity;

            //int count = hull.Length;

            // TODO: precalculate this when building the hull and save a step.
            for (int j = 0, i = count - 1; j < count; i = j, j++)
            {
                float d = ClosestDist(hull[i].ab, hull[j].ab);
                if (d < minDist)
                {
                    minDist = d;
                    mini    = i;
                }
            }

            MinkowskiPoint v0 = hull[mini];
            MinkowskiPoint v1 = hull[(mini + 1) % count];

            cp.AssertSoft(!cpVect.cpveql(v0.ab, v1.ab), string.Format("Internal Error: EPA vertexes are the same ({0} and {1})", mini, (mini + 1) % count));

            MinkowskiPoint p = MinkowskiPoint.Support(ref ctx,
                                                      cpVect.cpvperp(cpVect.cpvsub(v1.ab, v0.ab)));

#if DRAW_EPA
            cpVect verts[count];