public class TriangularFacetInterpolator extends Object implements IInterpolatorOverTin
Constructor and Description |
---|
TriangularFacetInterpolator(IIncrementalTin tin)
Construct an interpolator that operates on the specified TIN.
|
Modifier and Type | Method and Description |
---|---|
String |
getMethod()
Gets a string describing the interpolation method
that can be used for labeling graphs and printouts.
|
double[] |
getSurfaceNormal()
Gets the unit normal to the surface at the position of the most
recent interpolation.
|
double |
interpolate(double x,
double y,
IVertexValuator valuator)
Perform linear interpolation treating the triangle that contains the
query point as a flat plane.
|
double |
interpolateWithExteriorSupport(double x,
double y,
IVertexValuator valuator)
Performs an interpolation with special handling to provide
values for regions to the exterior of the Delaunay Triangulation.
|
boolean |
isSurfaceNormalSupported()
Indicates whether the interpolation class supports the computation
of surface normals through the getUnitNormal() method.
|
void |
resetForChangeToTin()
Used by an application to reset the state data within the interpolator
when the content of the TIN may have changed.
|
public TriangularFacetInterpolator(IIncrementalTin tin)
tin
- a valid instance of an incremental TIN.public void resetForChangeToTin()
resetForChangeToTin
in interface IProcessUsingTin
public double interpolate(double x, double y, IVertexValuator valuator)
This interpolation is not defined beyond the convex hull of the TIN and this method will produce a Double.NaN if the specified coordinates are exterior to the TIN.
interpolate
in interface IInterpolatorOverTin
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.public boolean isSurfaceNormalSupported()
IInterpolatorOverTin
isSurfaceNormalSupported
in interface IInterpolatorOverTin
public double[] getSurfaceNormal()
getSurfaceNormal
in interface IInterpolatorOverTin
public String getMethod()
IInterpolatorOverTin
getMethod
in interface IInterpolatorOverTin
public double interpolateWithExteriorSupport(double x, double y, IVertexValuator valuator)
When the query point is outside the TIN, the normal vector is computed based on the behavior of the plane generated by the z values in the region adjacent to the perimeter edge.
This method does not perform an extrapolation. Instead, the computed value is assigned the value of the nearest point on the convex hull of the TIN.
Note that this method can still return a NaN value if the TIN is not populated with at least one non-trivial triangle.
x
- the planar x coordinate of the interpolation pointy
- the planar y coordinate of the interpolation pointvaluator
- a valid valuator for interpreting the z value of each
vertex or a null value to use the default.Copyright © 2021. All rights reserved.