The contains() method in java.awt.Polygon might not return true for all the points that you expect. Example: xArray = {0, 5, 10, 15, 15, 0}, yArray = {0, 5, 3, 10, 0 ...
A wrapper around the values needed for a malleable 2D polygon collision class will detect, but not resolve, collisions. It uses an efficient data search structure to quickly find intersecting ...