/** * Finds all non-horizontal segments intersecting the stabbing line. * The stabbing line is the ray to the right of stabbingRayLeftPt. * * @param stabbingRayLeftPt the left-hand origin of the stabbing line * @return a List of {@link DepthSegments} intersecting the stabbing line */ private List findStabbedSegments(Coordinate stabbingRayLeftPt) { List stabbedSegments = new ArrayList(); for (Iterator i = subgraphs.iterator(); i.hasNext(); ) { BufferSubgraph bsg = (BufferSubgraph) i.next(); // optimization - don't bother checking subgraphs which the ray does not intersect Envelope env = bsg.getEnvelope(); if (stabbingRayLeftPt.y < env.getMinY() || stabbingRayLeftPt.y > env.getMaxY()) continue; findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments); } return stabbedSegments; }
polyBuilder.add(subgraph.getDirectedEdges(), subgraph.getNodes());
/** * Finds all non-horizontal segments intersecting the stabbing line. * The stabbing line is the ray to the right of stabbingRayLeftPt. * * @param stabbingRayLeftPt the left-hand origin of the stabbing line * @return a List of {@link DepthSegments} intersecting the stabbing line */ private List findStabbedSegments(Coordinate stabbingRayLeftPt) { List stabbedSegments = new ArrayList(); for (Iterator i = subgraphs.iterator(); i.hasNext(); ) { BufferSubgraph bsg = (BufferSubgraph) i.next(); // optimization - don't bother checking subgraphs which the ray does not intersect Envelope env = bsg.getEnvelope(); if (stabbingRayLeftPt.y < env.getMinY() || stabbingRayLeftPt.y > env.getMaxY()) continue; findStabbedSegments(stabbingRayLeftPt, bsg.getDirectedEdges(), stabbedSegments); } return stabbedSegments; }
polyBuilder.add(subgraph.getDirectedEdges(), subgraph.getNodes());