📜  如何在java代码示例中查看一个形状是否正在接触另一个形状

📅  最后修改于: 2022-03-11 14:52:03.549000             🧑  作者: Mango

代码示例1
public static boolean testIntersection(Shape shapeA, Shape shapeB) {
   Area areaA = new Area(shapeA);
   areaA.intersect(new Area(shapeB));
   return !areaA.isEmpty();
}