| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
package org.locationtech.jts.triangulate.quadedge; |
| 14 |
|
| 15 |
import java.util.ArrayList; |
| 16 |
import java.util.List; |
| 17 |
|
| 18 |
|
| 19 |
/** |
| 20 |
* Utilities for working with {@link QuadEdge}s. |
| 21 |
* |
| 22 |
* @author mbdavis |
| 23 |
* |
| 24 |
*/ |
| 25 |
public class QuadEdgeUtil |
| 26 |
{ |
| 27 |
/** |
| 28 |
* Gets all edges which are incident on the origin of the given edge. |
| 29 |
* |
| 30 |
* @param start |
| 31 |
* the edge to start at |
| 32 |
* @return a List of edges which have their origin at the origin of the given |
| 33 |
* edge |
| 34 |
*/ |
| 35 |
public static List findEdgesIncidentOnOrigin(QuadEdge start) { |
| 36 |
List incEdge = new ArrayList(); |
| 37 |
|
| 38 |
QuadEdge qe = start; |
| 39 |
do { |
| 40 |
incEdge.add(qe); |
| 41 |
qe = qe.oNext(); |
| 42 |
} while (qe != start); |
| 43 |
|
| 44 |
return incEdge; |
| 45 |
} |
| 46 |
|
| 47 |
} |
| 48 |
|