Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to see if a shape is touching another shape in java

public static boolean testIntersection(Shape shapeA, Shape shapeB) {
   Area areaA = new Area(shapeA);
   areaA.intersect(new Area(shapeB));
   return !areaA.isEmpty();
}
 
PREVIOUS NEXT
Tagged: #shape #touching #shape #java
ADD COMMENT
Topic
Name
8+1 =