java.lang.Object
org.spongepowered.noise.module.NoiseModule
org.spongepowered.noise.module.modifier.Invert
Noise module that inverts the output value from a source module.
- Source Modules
- This module requires one source module.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
The default middle value for anInvert
module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule
-
Constructor Summary
ConstructorsConstructorDescriptionInvert()
Invert
(NoiseModule source) Create a new Invert module with the source modules pre-configured. -
Method Summary
Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_MIDDLE
public static final double DEFAULT_MIDDLEThe default middle value for anInvert
module.- See Also:
-
-
Constructor Details
-
Invert
public Invert() -
Invert
Create a new Invert module with the source modules pre-configured.- Parameters:
source
- the input module
-
-
Method Details
-
middle
public double middle()Get the middle or 'zero' value to invert around.- Returns:
- the middle value
- See Also:
-
setMiddle
public void setMiddle(double middle) Set the middle or 'zero' value to invert around.- Parameters:
middle
- the middle value- See Also:
-
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
-