Commit dae0bc66 authored by Stefan Sechelmann's avatar Stefan Sechelmann

get a boundary edge for a boundary vertex

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@1697 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 7399f7fe
......@@ -531,6 +531,26 @@ public final class HalfEdgeUtils {
return false;
}
/**
* For a boundary vertex, the incoming edge with getRightFace() == null
* is returned.
* <p>
* Uses {@link #incomingEdges(Vertex)}, so the preconditions explained there apply.
*
* @param vertex
* @return The first boundary edge that is found with the given vertex as target,
* null if the vertex is no boundary vertex.
*/
static public <V extends Vertex<V,E,?>,E extends Edge<V,E,?>> E incomingBoundaryEdge(V vertex) {
List<E> incoming = incomingEdges(vertex);
for (E e : incoming) {
if (e.getRightFace() == null) {
return e;
}
}
return null;
}
/**
* Test if a given edge is on the boundary.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment