private static boolean interiorEnvExteriorEnv_ ( Envelope2D env_a , Envelope2D env_b , double tolerance ) { Envelope2D envBInflated = new Envelope2D ( ) ; envBInflated . setCoords ( env_b ) ; envBInflated . inflate ( tolerance , tolerance ) ; Point2D pt = new Point2D ( ) ; env_a . queryLowerLeft ( pt ) ; if ( ! envBInflated . contains ( pt ) ) return true ; env_a . queryLowerRight ( pt ) ; if ( ! envBInflated . contains ( pt ) ) return true ; env_a . queryUpperLeft ( pt ) ; if ( ! envBInflated . contains ( pt ) ) return true ; env_a . queryUpperRight ( pt ) ; if ( ! envBInflated . contains ( pt ) ) return true ; assert ( envBInflated . contains ( env_a ) ) ; return false ; }
Returns true if a coordinate of envelope A is outside of envelope B .