How can I detect that a Polygon is intersects with a Rectangle?
Created May 4, 2012
James Outlaw If your Polygon Class inherits from java.awt.Shape, you can use the intersects() method to determine if the polygon intersects the rectangle. Something like this:
if (myPolygon.interesects(myRectangle)) {
// do something
}