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
ConstructorDescriptionHeightMap
(EditSession session, Region region) Constructs the HeightMap.HeightMap
(EditSession session, Region region, int[] data, boolean layers) HeightMap
(EditSession session, Region region, Mask mask) HeightMap
(EditSession session, Region region, Mask mask, boolean layers) -
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.int
applyLayers
(int[] data)
-
Constructor Details
-
HeightMap
Constructs the HeightMap.- Parameters:
session
- an edit sessionregion
- the region
-
HeightMap
-
HeightMap
-
HeightMap
-
-
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
-
applyLayers
public int applyLayers(int[] data) -
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
-