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

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

public interface LocatedMesh<V>
extends MetricMesh<V>

A mesh with 3D vertex positions.

This is probably the most common kind of mesh, with explicit coordinates given for the three corners of each triangle. Still keep in mind that vertices are compared using V.equals, so the same coordinates may represent different vertices if they don't compare equal, and different vertex objects may represent the same vertex if they do compare equal.

This interface is also used for flat 2D meshes, where the z coordinate is always fixed to zero.

It is permissible for mesh transformations to use the same objects to represent the combinatorics of the mesh, but associate different coordinates with the vertices. Therefore this interface assumes the mesh knows about coordinates, not necessarily the vertex objects. A conforming implementation should avoid relying on coordinates provided directly by the vertex objects.

Since:
1.0
Author:
Martin von Gagern

Method Summary
 double getX(V v)
          Determine x coordinate of a vertex.
 double getY(V v)
          Determine y coordinate of a vertex.
 double getZ(V v)
          Determine z coordinate of a vertex.
 
Methods inherited from interface net.von_gagern.martin.confoo.mesh.MetricMesh
edgeLength
 
Methods inherited from interface net.von_gagern.martin.confoo.mesh.CombinatoricMesh
iterator
 

Method Detail

getX

double getX(V v)
Determine x coordinate of a vertex.

An implementation may throw any convenient RuntimeException if the vertex is not part of this mesh, but it is not required to do so.

Parameters:
v - a vertex of the mesh
Returns:
the x coordinate of that vertex

getY

double getY(V v)
Determine y coordinate of a vertex.

An implementation may throw any convenient RuntimeException if the vertex is not part of this mesh, but it is not required to do so.

Parameters:
v - a vertex of the mesh
Returns:
the y coordinate of that vertex

getZ

double getZ(V v)
Determine z coordinate of a vertex. For 2D meshes this should always be zero.

An implementation may throw any convenient RuntimeException if the vertex is not part of this mesh, but it is not required to do so.

Parameters:
v - a vertex of the mesh
Returns:
the z coordinate of that vertex


Copyright © 2008-2009 Martin von Gagern. All Rights Reserved.