Class EdgeSetIntersector

 1  
 2  
 3  
 4 /*
 5  * Copyright (c) 2016 Vivid Solutions.
 6  *
 7  * All rights reserved. This program and the accompanying materials
 8  * are made available under the terms of the Eclipse Public License 2.0
 9  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
10  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v20.html
11  * and the Eclipse Distribution License is available at
12  *
13  * http://www.eclipse.org/org/documents/edl-v10.php.
14  */
15 package org.locationtech.jts.geomgraph.index;
16  
17 /**
18  * @version 1.7
19  */
20 import java.util.List;
21  
22 /**
23  * An EdgeSetIntersector computes all the intersections between the
24  * edges in the set.  It adds the computed intersections to each edge
25  * they are found on.  It may be used in two scenarios:
26  * <ul>
27  * <li>determining the internal intersections between a single set of edges
28  * <li>determining the mutual intersections between two different sets of edges
29  * </ul>
30  * It uses a {@link SegmentIntersector} to compute the intersections between
31  * segments and to record statistics about what kinds of intersections were found.
32  *
33  * @version 1.7
34  */
35 public abstract class EdgeSetIntersector 
36 {
37   public EdgeSetIntersector() {
38   }
39  
40   /**
41    * Computes all self-intersections between edges in a set of edges,
42    * allowing client to choose whether self-intersections are computed.
43    *
44    * @param edges a list of edges to test for intersections
45    * @param si the SegmentIntersector to use
46    * @param testAllSegments true if self-intersections are to be tested as well
47    */
48   abstract public void computeIntersections(List edges, SegmentIntersector si, boolean testAllSegments);
49  
50   /**
51    * Computes all mutual intersections between two sets of edges.
52    */
53   abstract public void computeIntersections(List edges0, List edges1, SegmentIntersector si);
54  
55  
56  
57 }
58