int height = pImageHeight;
double x[] = pMesh3D.getX();
double y[] = pMesh3D.getY();
double z[] = pMesh3D.getZ();
WFImage heightMap = this.heightMap.getHDRImage();
if (heightMap != null) {
int hwidth = heightMap.getImageWidth();
int hheight = heightMap.getImageHeight();
if ((hwidth != this.hWidth) || (hheight != this.hHeight)) {
throw new IllegalArgumentException("Heightmap has the wrong size (scaling of HDR images currently not supported)");
}
float lum[] = new float[2];
((SimpleHDRImage) heightMap).getMinMaxLum(lum);
lumMin = lum[0];
lumMax = lum[1];
lumRange = lumMax - lumMin;
}
else {
heightMap = this.heightMap.getImage();
int hwidth = heightMap.getImageWidth();
int hheight = heightMap.getImageHeight();
if ((hwidth != this.hWidth) || (hheight != this.hHeight)) {
SimpleImage scaledHeightMap = ((SimpleImage) heightMap).clone();
ScaleTransformer scaleT = new ScaleTransformer();
scaleT.setAspect(this.aspect);
scaleT.setUnit(ScaleTransformer.Unit.PIXELS);