public static bool Intersects(ShapePrimitive a, ShapePrimitive b) { var aCircle = a as CircleShape; if (aCircle != null) { return Intersects(aCircle, b); } return CantCollide(a, b); }
public static bool Intersects(CircleShape a, ShapePrimitive b) { var bCircle = b as CircleShape; if (bCircle != null) { return Intersects(a, bCircle); } return CantCollide(a, b); }
private static bool CantCollide(ShapePrimitive a, ShapePrimitive b) { throw new NotImplementedException(string.Format( "Collision testing between {0} and {1} not implemented", a.GetType(), b.GetType() )); }