???
Is there any “better Boundary Detection”
than the minimum rectangle given in “getBounds()” method?
I am having huge problems with concave polygons.
???
???
Is there any “better Boundary Detection”
than the minimum rectangle given in “getBounds()” method?
I am having huge problems with concave polygons.
???
if you’re using the standard Java2D Polygon class, you can use the getPathIterator method, which will return a PathIterator for all the line segments that make up the actual boundary of your Polygon (not the rectangular boundary). If you’re just trying to check for collision, you may also want to look at the intersects and contains methods, which will return results based on the actual geometry of the polygon, not the rectangular boundary.