Hi, I've just started to check out javaGeom, and after a quick look, I didn't find an intersects() method for SimplePolygon2D.
I did see that Polygons2D has an intersection() method. Perhaps this would return null or a degenerate Polygon2D if the arguments don't intersect?
What's the best way to determine if two polygons intersect?
there are functions to compute the result of the intersection between two polygons, but there is no test function that returns a boolean result.
So you were right, one way to detects if two polygons intersect is to use the isEmpty() methods, that will tell you if the result of the operation contains a polygon or not.
I hope this answer your question ?
Yes, I understand, thanks.
Log in to post a comment.