public static boolean intersects ( Bbox one , Bbox two ) { if ( two . getX ( ) > one . getMaxX ( ) ) { return false ; } if ( two . getY ( ) > one . getMaxY ( ) ) { return false ; } if ( two . getMaxX ( ) < one . getX ( ) ) { return false ; } if ( two . getMaxY ( ) < one . getY ( ) ) { return false ; } return true ; }
Does one bounding box intersect another?