Interface IInterpolatorOverTin
-
- All Superinterfaces:
IProcessUsingTin
- All Known Implementing Classes:
InverseDistanceWeightingInterpolator,NaturalNeighborInterpolator,TriangularFacetInterpolator,TriangularFacetSpecialInterpolator
public interface IInterpolatorOverTin extends IProcessUsingTin
Defines an interface for interpolating data over a Triangulated Irregular Network implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetMethod()Gets a string describing the interpolation method that can be used for labeling graphs and printouts.double[]getSurfaceNormal()Computes the surface normal at the most recent interpolation point, returning an array of three values giving the unit surface normal as x, y, and z coordinates.doubleinterpolate(double x, double y, IVertexValuator valuator)Perform interpolation using the specified valuator.booleanisSurfaceNormalSupported()Indicates whether the interpolation class supports the computation of surface normals through the getUnitNormal() method.-
Methods inherited from interface org.tinfour.common.IProcessUsingTin
resetForChangeToTin
-
-
-
-
Method Detail
-
interpolate
double interpolate(double x, double y, IVertexValuator valuator)Perform interpolation using the specified valuator.Important Synchronization Issue
To improve performance, classes that implement this interface frequently maintain state data about the TIN that can be reused for query to query. They also avoid run-time overhead by not implementing any kind of Java synchronization or or even the concurrent-modification testing provided by the Java collection classes. If an application modifies the TIN, instances of this class will not be aware of the change. In such cases, interpolation methods may fail by either throwing an exception or, worse, returning an incorrect value. The onus is on the calling application to manage the use of this class and to ensure that no modifications are made to the TIN between interpolation operations. If the TIN is modified, the internal state data for this class must be reset using a call to resetForChangeToTin() defined in the IProcessUsingTin interface.
- Parameters:
x- the x coordinate for the interpolation pointy- the y coordinate for the interpolation pointvaluator- a valid valuator for interpreting the z value of each vertex or a null value to use the default.- Returns:
- if the interpolation is successful, a valid floating point value; otherwise, a NaN.
-
isSurfaceNormalSupported
boolean isSurfaceNormalSupported()
Indicates whether the interpolation class supports the computation of surface normals through the getUnitNormal() method.- Returns:
- true if the class implements the ability to compute surface normals; otherwise, false.
-
getSurfaceNormal
double[] getSurfaceNormal()
Computes the surface normal at the most recent interpolation point, returning an array of three values giving the unit surface normal as x, y, and z coordinates. If the recent interpolation was unsuccessful (returned a Java Double.NaN), the results of this method call are undefined. If the computation of surface normals is not supported, the class may throw an UnsupportedOperationException.- Returns:
- if defined and successful, a valid array of dimension 3 giving the x, y, and z components of the unit normal, respectively; otherwise, a zero-sized array.
-
getMethod
String getMethod()
Gets a string describing the interpolation method that can be used for labeling graphs and printouts. Because this string may be used as a column header in a table, its length should be kept short.- Returns:
- A valid string
-
-