public override object Clone() { PointMask mask = new PointMask(_point); mask._pos = _pos; return mask; }
// Circle -- [____] Collision Tests public static bool TestOverlap(CircleMask cMask, PointMask ptMask) { return TestOverlap(ptMask, cMask); }
public static bool TestOverlap(PointMask ptMask, TriangleMask triMask) { PointFP bary = triMask.Barycentric((VectorFP)ptMask._pos + ptMask._point); return (bary.X > 0 && bary.Y > 0 && (bary.X + bary.Y) < 1); }
public static bool TestOverlapEdge(PointMask ptMask, AABBMask rMask) { VectorFP p0 = (VectorFP)ptMask._pos + ptMask._point; return TestOverlapEdge(rMask, p0.X, p0.Y); }
public static bool TestOverlapEdge(PointMask ptMask, LineMask lnMask) { VectorFP p1 = (VectorFP)ptMask._pos + ptMask._point; return TestOverlapEdge(lnMask, p1.X, p1.Y); }
public static bool TestOverlapEdge(PointMask ptMask, CircleMask cMask) { VectorFP p0 = (VectorFP)ptMask._pos + ptMask._point; return TestOverlapEdge(cMask, p0.X, p0.Y); }
public static bool TestOverlapEdge(PointMask ptMask1, PointMask ptMask2) { VectorFP p1 = (VectorFP)ptMask1._pos + ptMask1._point; return TestOverlapEdge(ptMask2, p1.X, p1.Y); }
// Point -- [____] Collision + Edge Tests public static bool TestOverlapEdge(PointMask ptMask, FPInt x, FPInt y) { VectorFP p2 = (VectorFP)ptMask._pos + ptMask._point; return x == p2.X && y == p2.Y; }
public static bool TestOverlap(PointMask ptMask, LineMask lnMask) { return false; }
// Triangle -- [____] Collision Tests public static bool TestOverlap(TriangleMask triMask, PointMask ptMask) { return TestOverlap(ptMask, triMask); }
public static bool TestOverlap(PointMask ptMask, AYLine yl) { return false; }
// AABB -- [____] Collision Tests public static bool TestOverlap(AABBMask rMask, PointMask ptMask) { return TestOverlap(ptMask, rMask); }
// Line -- [____] Collision Tests public static bool TestOverlap(LineMask lnMask, PointMask ptMask) { return TestOverlap(ptMask, lnMask); }
public static bool TestOverlap(AYLine ylMask, PointMask ptMask) { return TestOverlap(ptMask, ylMask); }
public static bool TestOverlap(AXLine xlMask, PointMask ptMask) { return TestOverlap(ptMask, xlMask); }
// Point -- [____] Collision Tests public static bool TestOverlap(PointMask ptMask1, PointMask ptMask2) { return false; }