### new Method is Boundary Face

parent b1ac4354
 ... ... @@ -536,44 +536,44 @@ public final class HalfEdgeUtils { /** * Test if a given vertex is on the boundary. * For a boundary vertex, the incoming edge with getRightFace() == null * is returned. *

* Uses {@link #incomingEdges(Vertex)}, so the preconditions explained there apply. * * @param vertex * @return {@code true} if there is an incoming edge with {@code null} as {@linkplain de.jtem.halfedge.Edge#getLeftFace() left face}, otherwise {@code false}. * @return The first boundary edge that is found with the given vertex as target, * null if the vertex is no boundary vertex. */ static public ,E extends Edge> boolean isBoundaryVertex(V vertex) { static public ,E extends Edge> E incomingBoundaryEdge(V vertex) { List incoming = incomingEdges(vertex); for (E e : incoming) { if (e.getLeftFace() == null) { return true; if (e.getRightFace() == null) { return e; } } return false; return null; } /** * For a boundary vertex, the incoming edge with getRightFace() == null * is returned. * Test if a given vertex is on the boundary. *

* 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. * @return {@code true} if there is an incoming edge with {@code null} as {@linkplain de.jtem.halfedge.Edge#getLeftFace() left face}, otherwise {@code false}. */ static public ,E extends Edge> E incomingBoundaryEdge(V vertex) { static public ,E extends Edge> boolean isBoundaryVertex(V vertex) { List incoming = incomingEdges(vertex); for (E e : incoming) { if (e.getRightFace() == null) { return e; if (e.getLeftFace() == null) { return true; } } return null; return false; } /** * Test if a given edge is on the boundary. * ... ... @@ -584,6 +584,16 @@ public final class HalfEdgeUtils { return e.getLeftFace() == null || e.getRightFace() == null; } /** * Test if a given Face is on the boundary. * * @param f * @return {@code true} if either e.getLeftFace() == null or e.getRightFace() == null. */ static public , F extends Face> boolean isBoundaryFace(F f) { return !isInteriorFace(f); } /** * Test if a given face is an inerior face (that is, not 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!