de.javagl.simplemesh.utils
Class Topology

java.lang.Object
  extended by de.javagl.simplemesh.utils.Topology

public class Topology
extends java.lang.Object

Utility methods for obtaining topology information from sets of primitives.


Method Summary
static java.util.Map<Edge,java.util.List<Edge>> computeEdgeEdges(java.lang.Iterable<? extends Edge> edges)
          Compute a map from all edges to the edges that they are adjacent to
static java.util.Map<Edge,java.util.List<Face>> computeEdgeFaces(java.lang.Iterable<? extends Face> faces)
          Compute a map from all edges of the given faces to their respective list of faces.
static java.util.List<Edge> computeEdges(java.lang.Iterable<? extends Face> faces)
          Compute the list of edges of the given faces.
static java.util.Map<Vertex,java.util.List<Edge>> computeVertexEdges(java.lang.Iterable<? extends Edge> edges)
          Compute a map from all vertices of the given edges to the list of adjacent edges.
static java.util.Map<Vertex,java.util.List<Face>> computeVertexFaces(java.lang.Iterable<? extends Face> faces)
          Compute a map from all vertices of the given face to their respective list of faces.
static java.util.Map<Vertex,java.util.List<Vertex>> computeVertexNeighbors(java.lang.Iterable<? extends Edge> edges)
          Compute a map from all vertices of the given edges to their respective list of neighbors.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

computeVertexFaces

public static java.util.Map<Vertex,java.util.List<Face>> computeVertexFaces(java.lang.Iterable<? extends Face> faces)
Compute a map from all vertices of the given face to their respective list of faces.

Parameters:
faces - The input face
Returns:
The map from each vertex to its faces

computeEdgeFaces

public static java.util.Map<Edge,java.util.List<Face>> computeEdgeFaces(java.lang.Iterable<? extends Face> faces)
Compute a map from all edges of the given faces to their respective list of faces. The edges that are used as keys in this map do not have valid indices.

Parameters:
faces - The input faces
Returns:
The map from each edge to its faces

computeVertexEdges

public static java.util.Map<Vertex,java.util.List<Edge>> computeVertexEdges(java.lang.Iterable<? extends Edge> edges)
Compute a map from all vertices of the given edges to the list of adjacent edges.

Parameters:
edges - The input edges
Returns:
The map from each vertex to its edges

computeVertexNeighbors

public static java.util.Map<Vertex,java.util.List<Vertex>> computeVertexNeighbors(java.lang.Iterable<? extends Edge> edges)
Compute a map from all vertices of the given edges to their respective list of neighbors.

Parameters:
edges - The input edges
Returns:
The map from each vertex to its neighbors

computeEdgeEdges

public static java.util.Map<Edge,java.util.List<Edge>> computeEdgeEdges(java.lang.Iterable<? extends Edge> edges)
Compute a map from all edges to the edges that they are adjacent to

Parameters:
edges - The edges
Returns:
The resulting map

computeEdges

public static java.util.List<Edge> computeEdges(java.lang.Iterable<? extends Face> faces)
Compute the list of edges of the given faces.

Parameters:
faces - The input faces
Returns:
The edges