|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.von_gagern.martin.confoo.conformal.Conformal<V>
V - the class used to represent vertices of the meshpublic class Conformal<V>
Conformal transformations of triangle meshes.
A typical code snippet would look like this:
Conformal<VertexType> c =Conformal.getInstance(mesh); c.fixedBoundaryCurvature(angles); c.transform();
| Method Summary | ||
|---|---|---|
ResultMesh<V> |
call()
Callable interface to the transform method. |
|
protected void |
configureNewton(Newton newton)
Configure the optimizer used for the transformation. |
|
void |
fixedBoundaryCurvature(Map<? extends V,Double> angles)
Set boundary condition to given angles. |
|
double |
getAngleErrorBound()
Get the maximal angle error during transformation. |
|
Geometry |
getInputGeometry()
Get the currently configured geometry of the input mesh. |
|
static
|
getInstance(MetricMesh<V> mesh)
Convenience factory method. |
|
Geometry |
getOutputGeometry()
Get the currently configured geometry of the output mesh. |
|
void |
isometricBoundaryCondition()
Set boundary condition for preserved boundary edge lengths. |
|
void |
setAngleErrorBound(double epsilon)
Set the maximal angle error during transformation. |
|
void |
setInputGeometry(Geometry inputGeometry)
Set the geometry of the input mesh. |
|
void |
setLayoutStartTriangle(CorneredTriangle<? extends V> start)
Set the triangle to be layed out first. |
|
void |
setOutputGeometry(Geometry outputGeometry)
Set the geometry of the output mesh. |
|
void |
throwInterceptedExceptions()
Re-throw exceptions intercepted by call. |
|
ResultMesh<V> |
transform()
Perform transformation. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <V> Conformal<V> getInstance(MetricMesh<V> mesh)
throws MeshException
V - the class used to represent vertices of the meshmesh - the mesh to be transformed
MeshExceptionpublic void setAngleErrorBound(double epsilon)
epsilon - the new error boundgetAngleErrorBound()public double getAngleErrorBound()
setAngleErrorBound(double)public void fixedBoundaryCurvature(Map<? extends V,Double> angles)
All vertices contained as keys in the map will be assigned a target angle according to the map value, given in radians. Other vertices will be assigned a target angle of 2π if they in the interior of the mesh or π if they lie on the boundary of the mesh. The result will be a polygon with corner angles specified by the map.
angles - the map of fixed corner anglesisometricBoundaryCondition()public void isometricBoundaryCondition()
All boundary and corner vertices will be fixed in order to keep the lengths of boundary edges unmodified. Internal vertices will be assigned a target angle sum of 2π, resulting in a flat mesh.
fixedBoundaryCurvature(Map)public Geometry getInputGeometry()
setInputGeometry(net.von_gagern.martin.confoo.conformal.Geometry),
getOutputGeometry()public void setInputGeometry(Geometry inputGeometry)
UnsupportedOperationException - if the geometry is neither
EUCLIDEAN nor HYPERBOLICgetInputGeometry(),
setOutputGeometry(net.von_gagern.martin.confoo.conformal.Geometry)public Geometry getOutputGeometry()
setOutputGeometry(net.von_gagern.martin.confoo.conformal.Geometry),
getInputGeometry()public void setOutputGeometry(Geometry outputGeometry)
UnsupportedOperationException - if the geometry is neither
EUCLIDEAN nor HYPERBOLICgetOutputGeometry(),
setInputGeometry(net.von_gagern.martin.confoo.conformal.Geometry)public void setLayoutStartTriangle(CorneredTriangle<? extends V> start)
null, a central triangle is
automatically determined.
start - the triangle first to be layed out
public ResultMesh<V> transform()
throws MeshException,
TriangleInequalityException,
NoSuchVertexException
The returned object is defined to be a ResultMesh
only since version 1.1. Before that it was only specified to be
a LocatedMesh.
IllegalStateException - if no boundary condition was set
MeshException - if the input mesh is malformed or too degenerate
TriangleInequalityException - if the result would violate
the triangle inequality
NoSuchVertexException - if a part of the boundary condition
doesn't applyprotected void configureNewton(Newton newton)
newton - the optimizer to be configuredpublic ResultMesh<V> call()
transform method.
This method allows performing the transformation in a different
thread. However, as a call method may not throw
any checked exceptions, special care has to be taken to catch
these exceptions later on. The main thread that was waiting for
the result should call throwInterceptedExceptions
to re-throw any exceptions that occurred during execution in a
different thread.
Any application not using multiple threads should rather call
transform directly to deal with exceptions more
easily.
The returned object is defined to be a ResultMesh
only since version 1.1. Before that it was only specified to be
a LocatedMesh.
call in interface Callable<ResultMesh<V>>IllegalStateException - if there is an uncleared
exception from a previous invocationtransform(),
throwInterceptedExceptions()
public void throwInterceptedExceptions()
throws MeshException
call.
This method must be called after every invocation of
call in order to clear and re-throw any exceptions
which occurred during the execution of transform.
MeshExceptioncall()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||