Class HeightMapFilter
java.lang.Object
com.sk89q.worldedit.math.convolution.HeightMapFilter
Allows applications of Kernels onto the region's height map.
Only used for smoothing (with a GaussianKernel).
-
Constructor Summary
ConstructorsConstructorDescriptionHeightMapFilter
(int kernelWidth, int kernelHeight, float[] kernelData) Construct the HeightMapFilter object.HeightMapFilter
(Kernel kernel) Construct the HeightMapFilter object. -
Method Summary
-
Constructor Details
-
HeightMapFilter
Construct the HeightMapFilter object.- Parameters:
kernel
- the kernel
-
HeightMapFilter
public HeightMapFilter(int kernelWidth, int kernelHeight, float[] kernelData) Construct the HeightMapFilter object.- Parameters:
kernelWidth
- the widthkernelHeight
- the heightkernelData
- the data
-
-
Method Details
-
getKernel
Get the kernel. -
setKernel
Set the kernel.- Parameters:
kernel
- the kernel
-
filter
public int[] filter(int[] inData, int width, int height) Filter with a 2D kernel.- Parameters:
inData
- the datawidth
- the widthheight
- the height- Returns:
- the modified height map
-