java.lang.Object
org.spongepowered.noise.module.NoiseModule
org.spongepowered.noise.module.source.Const
Noise module that outputs a constant value.
To specify the constant value, call the setValue(double)
method.
This noise module is not useful by itself, but is often used as a source module for other noise modules.
- Source Modules
- This module does not require any source modules.
-
Field Summary
Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule
-
Constructor Summary
-
Method Summary
Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_VALUE
public static final double DEFAULT_VALUE- See Also:
-
-
Constructor Details
-
Const
public Const()
-
-
Method Details
-
value
public double value()Get the constant value for this noise module.- Returns:
- the constant output value for this noise module.
-
setValue
public void setValue(double value) Set the constant value for this noise module.- Parameters:
value
- the constant output value for this noise module.
-
get
public double get(double x, double y, double z) Description copied from class:NoiseModule
Generates an output value given the coordinates of the specified input value.All source modules required by this module must have been connected with the
NoiseModule.setSourceModule(int, NoiseModule)
method. If these source modules are not connected, this method will throw aNoModuleException
.To determine the number of source modules required by this noise module, call the
NoiseModule.sourceModuleCount()
method.- Specified by:
get
in classNoiseModule
- Parameters:
x
- thex
coordinate of the input valuey
- they
coordinate of the input valuez
- thez
coordinate of the input value- Returns:
- the output value
-