Class HeightMap
java.lang.Object
com.sk89q.worldedit.math.convolution.HeightMap
Allows applications of Kernels onto the region's height map.
Currently only used for smoothing (with a GaussianKernel)
.-
Constructor Summary
ConstructorsConstructorDescriptionHeightMap
(EditSession session, Region region, Mask mask) Constructs the HeightMap. -
Method Summary
Modifier and TypeMethodDescriptionint
apply
(int[] data) Apply a raw heightmap to the region.int
applyFilter
(HeightMapFilter filter, int iterations) Apply the filter 'iterations' amount times.
-
Constructor Details
-
HeightMap
Constructs the HeightMap.- Parameters:
session
- an edit sessionregion
- the region
-
-
Method Details
-
applyFilter
Apply the filter 'iterations' amount times.- Parameters:
filter
- the filteriterations
- the number of iterations- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- if the maximum block change limit is exceeded
-
apply
Apply a raw heightmap to the region.- Parameters:
data
- the data- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- if the maximum block change limit is exceeded
-