private static boolean checkVerticesForIntersection_ ( MultiVertexGeometryImpl geom , RasterizedGeometry2D rgeom ) { // Do a quick raster test for each point. If any point is inside, then // there is an intersection. int pointCount = geom . getPointCount ( ) ; Point2D pt = new Point2D ( ) ; for ( int ipoint = 0 ; ipoint < pointCount ; ipoint ++ ) { geom . getXY ( ipoint , pt ) ; RasterizedGeometry2D . HitType hit = rgeom . queryPointInGeometry ( pt . x , pt . y ) ; if ( hit == RasterizedGeometry2D . HitType . Inside ) { return true ; } } return false ; }
Returns true if intersects and false if nothing can be determined .