Well, I'm not sure if your MasterOval
class implements the Shape
interface or not, but if it does (if it doesn't, consider using Ellipse2D.Double
or something of that sort), the easiest way (standard perhaps ?) of checking for collision between Shape
instances is using Area
:
Shape1 shape1 = new Arc2D.Double(...);
Shape2 shape2 = new Ellipse2D.Double(...);
Area area1 = new Area(shape1);
Area area2 = new Area(shape2);
if (area1.intersect(area2)) {
...
}