Commit 73f17249 authored by Stefan Sechelmann's avatar Stefan Sechelmann

add findEdgesBetweenFaces method to the utilities

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@1660 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 2dd0a965
......@@ -700,6 +700,27 @@ public final class HalfEdgeUtils {
return null;
}
/**
* Finds all edges with given left and right faces.
* <p>
* Uses {@link #boundaryEdges(Face)}, so the preconditions explained there apply.
* @param <E> the edge type
* @param <F> the face type
* @param leftFace the left face
* @param rightFace the right face
* @return a list of edges with those faces as left and right face, or an empty list if no such edge exists.
*/
static public <E extends Edge<?,E,F>, F extends Face<?,E,F>> List<E> findEdgesBetweenFaces(F leftFace, F rightFace) {
List<E> result = new LinkedList<E>();
for (E e : boundaryEdges(leftFace)) {
if (rightFace == e.getRightFace()) {
result.add(e);
}
}
return result;
}
/**
* Construct a new face by giving its vertices in cyclic order.
* <p>
......
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