public static bool TestOverlapEdge(LineMask lnMask, FPInt x, FPInt y) { PointFP cp = lnMask.ClosestPoint(new PointFP(x, y)); return x == cp.X && y == cp.Y; }
public static bool TestOverlap(CircleMask cMask, LineMask lnMask) { VectorFP c = (VectorFP)cMask._pos + cMask._p; VectorFP p = lnMask.ClosestPoint(c); p = p - c; FPInt p2 = p.LengthSquared(); FPInt r2 = cMask._radius * cMask._radius; return (p2 < r2); }