Class SnowHeightMap
java.lang.Object
com.sk89q.worldedit.math.convolution.SnowHeightMap
Allows applications of Kernels onto the region's height map for snow layers
Currently only used for snow layer smoothing (with a GaussianKernel)
.-
Constructor Summary
ConstructorDescriptionSnowHeightMap
(EditSession session, Region region, Mask mask) Constructs the SnowHeightMap. -
Method Summary
Modifier and TypeMethodDescriptionint
applyChanges
(float[] data, int layerBlocks) Apply a raw heightmap to a region.float[]
applyFilter
(HeightMapFilter filter, int iterations) Compute the new heightmap with the filter 'iterations' amount times.
-
Constructor Details
-
SnowHeightMap
Constructs the SnowHeightMap.- Parameters:
session
- an edit sessionregion
- the regionmask
- optional mask for the height map
-
-
Method Details
-
applyFilter
Compute the new heightmap with the filter 'iterations' amount times.- Parameters:
filter
- the filteriterations
- the number of iterations- Returns:
- new generated heightmap of the terrain
-
applyChanges
Apply a raw heightmap to a region. Use snow layers.- Parameters:
data
- the datalayerBlocks
- amount of blocks with type SNOW_BLOCK- Returns:
- number of blocks affected
- Throws:
MaxChangedBlocksException
- if the maximum block change limit is exceeded
-