Class HeightMapFilter

java.lang.Object
com.sk89q.worldedit.math.convolution.HeightMapFilter

public class HeightMapFilter extends Object
Allows applications of Kernels onto the region's height map.

Only used for smoothing (with a GaussianKernel).

  • Constructor Details

    • HeightMapFilter

      public HeightMapFilter(Kernel kernel)
      Construct the HeightMapFilter object.
      Parameters:
      kernel - the kernel
    • HeightMapFilter

      public HeightMapFilter(int kernelWidth, int kernelHeight, float[] kernelData)
      Construct the HeightMapFilter object.
      Parameters:
      kernelWidth - the width
      kernelHeight - the height
      kernelData - the data
  • Method Details

    • getKernel

      public Kernel getKernel()
      Get the kernel.
    • setKernel

      public void setKernel(Kernel kernel)
      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 data
      width - the width
      height - the height
      Returns:
      the modified height map