net.von_gagern.martin.confoo.mesh
Interface MetricMesh<V>

Type Parameters:
V - the class used to represent vertices of this mesh
All Superinterfaces:
CombinatoricMesh<V>
All Known Subinterfaces:
LocatedMesh<V>
All Known Implementing Classes:
Mesh2D, ObjFormat

public interface MetricMesh<V>
extends CombinatoricMesh<V>

A mesh with edge length information.

This representation of a mesh conveys distance information along with the combinatorics of the mesh. It is suitably general to work for different geometries.

Since:
1.0
Author:
Martin von Gagern

Method Summary
 double edgeLength(V v1, V v2)
          Determine distance between adjacent vertices of the mesh.
 
Methods inherited from interface net.von_gagern.martin.confoo.mesh.CombinatoricMesh
iterator
 

Method Detail

edgeLength

double edgeLength(V v1,
                  V v2)
Determine distance between adjacent vertices of the mesh.

The returned length need not necessarily be equal to the euclidean length as determined from the vertex coordinates, if such coordinates are known in the first place.

An implementation may throw any convenient RuntimeException if the vertices are not adjacent, or not part of this mesh, but it is not required to do so. The order of the arguments should be irrelevant.

Parameters:
v1 - one vertex of an edge
v2 - a second vertex of the same edge
Returns:
the distance between the two vertices
Throws:
RuntimeException - if the vertices are not adjacent


Copyright © 2008 Martin von Gagern. All Rights Reserved.