Gaussian constructor
Gaussian(
- Float32List g,
- TerrainOptions options, [
- double s = 1,
- int kernelSize = 7,
Perform Gaussian smoothing on terrain vertices.
List<Vector3> g
The vertex array for plane geometry to modify with heightmap data. This
method sets the z property of each vertex.
TerrainOptions options
A map of settings that control how the terrain is constructed and
displayed. Valid values are the same as those for the options parameter
of {@link THREE.Terrain}().
double s = 1
The standard deviation of the Gaussian kernel to use. Higher values result
in smoothing across more cells of the src matrix.
int kernelSize = 7
The size of the Gaussian kernel to use. Larger kernels result in slower
but more accurate smoothing.
Implementation
Gaussian(Float32List g, TerrainOptions options, [double s = 1, int kernelSize = 7]) {
Terrain.fromArray2D(g, gaussian(Terrain.toArray2D(g, options), s, kernelSize));
}