org.jcae.mesh.amibe.patch
Class Calculus3D

java.lang.Object
  extended by org.jcae.mesh.amibe.patch.Calculus3D
All Implemented Interfaces:
Calculus

public class Calculus3D
extends java.lang.Object
implements Calculus

Distance computations in 2D parameter space by using 3D metrics.


Constructor Summary
Calculus3D(Mesh2D m)
          Constructor.
 
Method Summary
 double distance(Vertex2D start, Vertex2D end)
          Returns the Riemannian distance between nodes.
 double distance2(Vertex2D start, Vertex2D end, Metric2D m2)
          Returns Riemannian square distance between nodes.
 double[] getBounds2D(Vertex2D vm)
          Returns bounds of unit ellipse centered at a point.
 double length(VirtualHalfEdge2D ot)
          Returns the length of an edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Calculus3D

public Calculus3D(Mesh2D m)
Constructor.

Parameters:
m - the Mesh2D being modified.
Method Detail

distance

public double distance(Vertex2D start,
                       Vertex2D end)
Returns the Riemannian distance between nodes. This distance is computed with metrics on start and end points, and the maximal distance is returned.

Specified by:
distance in interface Calculus
Parameters:
start - the start node
end - the end node
Returns:
the distance between nodes

distance2

public double distance2(Vertex2D start,
                        Vertex2D end,
                        Metric2D m2)
Returns Riemannian square distance between nodes.

Specified by:
distance2 in interface Calculus
Parameters:
start - start node
end - end node
m2 - Riemannian metrics
Returns:
square distance between nodes

getBounds2D

public double[] getBounds2D(Vertex2D vm)
Returns bounds of unit ellipse centered at a point. This routine returns a double array which represents enclosing bounding box of unit ellipse. This method is used by KdTree.getNearestVertex(org.jcae.mesh.amibe.ds.Mesh, org.jcae.mesh.amibe.ds.Vertex); if an octant does not intersect this bounding box, it does also not intersect unit ellipse.

Specified by:
getBounds2D in interface Calculus
Parameters:
vm - the vertex on which metrics is evaluated
Returns:
bounding box of unit ellipse

length

public double length(VirtualHalfEdge2D ot)
Returns the length of an edge.

Specified by:
length in interface Calculus
Parameters:
ot - the edge being evaluated
Returns:
the distance between its two endpoints.