de.javagl.simplemesh.impl
Class DefaultMesh

java.lang.Object
  extended by de.javagl.simplemesh.impl.DefaultMesh
All Implemented Interfaces:
Mesh, MeshPrimitives, java.io.Serializable

public class DefaultMesh
extends java.lang.Object
implements Mesh

Default implementation of a Mesh.

See Also:
Serialized Form

Constructor Summary
DefaultMesh(MeshPrimitives meshPrimitives)
          Creates a new mesh from the given primitives
 
Method Summary
 java.util.List<Edge> getEdges()
          Returns an unmodifiable list of edges.
 java.util.List<Edge> getEdges(Vertex vertex)
          Returns an unmodifiable list of edges that are adjacent to the given vertex.
 java.util.List<Face> getFaces()
          Returns an unmodifiable list of faces.
 java.util.List<Face> getFaces(Edge edge)
          Returns an unmodifiable list of faces that are adjacent to the given edge.
 java.util.List<Face> getFaces(Vertex vertex)
          Returns an unmodifiable list of faces that are adjacent to the given vertex.
 java.util.List<Vertex> getVertices()
          Returns an unmodifiable list of vertices.
 java.util.List<Vertex> getVertices(Vertex vertex)
          Returns an unmodifiable list of vertices that are adjacent to the given vertex.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMesh

public DefaultMesh(MeshPrimitives meshPrimitives)
Creates a new mesh from the given primitives

Parameters:
meshPrimitives - The mesh primitives
Method Detail

getFaces

public java.util.List<Face> getFaces()
Description copied from interface: MeshPrimitives
Returns an unmodifiable list of faces.

Specified by:
getFaces in interface MeshPrimitives
Returns:
The list of faces.

getEdges

public java.util.List<Edge> getEdges()
Description copied from interface: MeshPrimitives
Returns an unmodifiable list of edges.

Specified by:
getEdges in interface MeshPrimitives
Returns:
The list of edges.

getVertices

public java.util.List<Vertex> getVertices()
Description copied from interface: MeshPrimitives
Returns an unmodifiable list of vertices.

Specified by:
getVertices in interface MeshPrimitives
Returns:
The list of vertices.

getFaces

public java.util.List<Face> getFaces(Edge edge)
Description copied from interface: Mesh
Returns an unmodifiable list of faces that are adjacent to the given edge.

Specified by:
getFaces in interface Mesh
Parameters:
edge - The edge
Returns:
The adjacent faces

getEdges

public java.util.List<Edge> getEdges(Vertex vertex)
Description copied from interface: Mesh
Returns an unmodifiable list of edges that are adjacent to the given vertex.

Specified by:
getEdges in interface Mesh
Parameters:
vertex - The vertex
Returns:
The adjacent edges

getFaces

public java.util.List<Face> getFaces(Vertex vertex)
Description copied from interface: Mesh
Returns an unmodifiable list of faces that are adjacent to the given vertex.

Specified by:
getFaces in interface Mesh
Parameters:
vertex - The vertex
Returns:
The adjacent faces

getVertices

public java.util.List<Vertex> getVertices(Vertex vertex)
Description copied from interface: Mesh
Returns an unmodifiable list of vertices that are adjacent to the given vertex.

Specified by:
getVertices in interface Mesh
Parameters:
vertex - The vertex
Returns:
The adjacent vertices