Package com.luciad.tea.hypsometry
Class TLcdHypsometricNormalizedNormalProvider
java.lang.Object
com.luciad.tea.hypsometry.TLcdHypsometricNormalizedNormalProvider
- All Implemented Interfaces:
ILcdHypsometricNormalProvider
public class TLcdHypsometricNormalizedNormalProvider
extends Object
implements ILcdHypsometricNormalProvider
This ILcdHypsometricNormalProvider delegates computing normals to a given
ILcdHypsometricNormalProvider, normalizing the resulting vector to a unit
length.
-
Constructor Summary
ConstructorDescriptionTLcdHypsometricNormalizedNormalProvider
(ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricNormalizedNormalProvider that will delegate the actual normal computations to the given normal provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeNormal
(ILcdMatrixView aMatrixView, int aX, int aY, double aElevationScale, double[] aNormalSFCT) Computes the normal at the given point.Returns the foot print of this provider.Returns the normal provider that actually computes the normals.
-
Constructor Details
-
TLcdHypsometricNormalizedNormalProvider
public TLcdHypsometricNormalizedNormalProvider(ILcdHypsometricNormalProvider aHypsometricNormalProvider) Creates a new TLcdHypsometricNormalizedNormalProvider that will delegate the actual normal computations to the given normal provider.- Parameters:
aHypsometricNormalProvider
- the normal provider to delegate to.
-
-
Method Details
-
getHypsometricNormalProvider
Returns the normal provider that actually computes the normals.- Returns:
- the normal provider.
-
getFootPrint
Description copied from interface:ILcdHypsometricNormalProvider
Returns the foot print of this provider. For instance, if the normal at each point is computed based on the surrounding 3x3 matrix values, the foot print is the rectangle (-1, -1, 3, 3).- Specified by:
getFootPrint
in interfaceILcdHypsometricNormalProvider
- Returns:
- the foot print of this provider.
-
computeNormal
public void computeNormal(ILcdMatrixView aMatrixView, int aX, int aY, double aElevationScale, double[] aNormalSFCT) Description copied from interface:ILcdHypsometricNormalProvider
Computes the normal at the given point. For reasons of efficiency, the normals are not necessarily normalized yet. It is up to the user to normalize them if necessary. The components of the normal may be NaN if they can't be computed, for instance if not all required elevations are known.- Specified by:
computeNormal
in interfaceILcdHypsometricNormalProvider
- Parameters:
aMatrixView
- the matrix containing elevation values.aX
- the x ordinate in the matrix.aY
- the y ordinate in the matrix.aElevationScale
- the scale of the elevation values in the tiles, expressed in matrix distance units per tile elevation unit.aNormalSFCT
- an array of 3 doubles to store the computed normal.
-