예제 #1
0
        public static bool TestOverlap(CircleMask cMask, AYLineMask ylMask)
        {
            VectorFP c1 = (VectorFP)cMask._pos + cMask._p;
            VectorFP c2 = ylMask.ClosestPoint(c1);

            FPInt d2 = VectorFP.DistanceSquared(c1, c2);
            FPInt r2 = cMask._radius * cMask._radius;

            return (r2 < d2);
        }