This noise module generates "billowy" noise suitable for clouds and rocks.
This noise module is nearly identical to Perlin
except this noise
module modifies each octave with an absolute-value function. See the
documentation of Perlin
for more information.
- Source Modules
- This module does not require any source modules.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Maximum number of octaves for theBillow
noise module.static final double
Default frequency for theBillow
noise module.static final double
Default lacunarity for theBillow
noise module.static final int
Default number of octaves for theBillow
noise module.static final double
Default persistence value for theBillow
noise module.static final NoiseQuality
Default noise quality for theBillow
noise module.static final int
Default noise seed for theBillow
noise module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the frequency of the first octave.double
get
(double x, double y, double z) Generates an output value given the coordinates of the specified input value.double
Get the lacunarity of the billowy noise.int
Returns the number of octaves that generate the billowy noise.double
Get the persistence value of the billowy noise.quality()
Get the quality of the billowy noise.int
seed()
Gets the seed used by the billowy-noise function.void
setFrequency
(double frequency) Sets the frequency of the first octave.void
setLacunarity
(double lacunarity) Set the lacunarity of the billowy noise.void
setOctaveCount
(int octaveCount) Sets the number of octaves that generate the billowy noise.void
setPersistence
(double persistence) Sets the persistence value of the billowy noise.void
setQuality
(NoiseQuality quality) Sets the quality of the billowy noise.void
setSeed
(int seed) Sets the seed value used by the billowy-noise function.Methods inherited from class org.spongepowered.noise.module.NoiseModule
setSourceModule, sourceModule, sourceModuleCount
-
Field Details
-
DEFAULT_BILLOW_FREQUENCY
public static final double DEFAULT_BILLOW_FREQUENCYDefault frequency for theBillow
noise module.- See Also:
-
DEFAULT_BILLOW_LACUNARITY
public static final double DEFAULT_BILLOW_LACUNARITYDefault lacunarity for theBillow
noise module.- See Also:
-
DEFAULT_BILLOW_OCTAVE_COUNT
public static final int DEFAULT_BILLOW_OCTAVE_COUNTDefault number of octaves for theBillow
noise module.- See Also:
-
DEFAULT_BILLOW_PERSISTENCE
public static final double DEFAULT_BILLOW_PERSISTENCEDefault persistence value for theBillow
noise module.- See Also:
-
DEFAULT_BILLOW_QUALITY
Default noise quality for theBillow
noise module. -
DEFAULT_BILLOW_SEED
public static final int DEFAULT_BILLOW_SEEDDefault noise seed for theBillow
noise module.- See Also:
-
BILLOW_MAX_OCTAVE
public static final int BILLOW_MAX_OCTAVEMaximum number of octaves for theBillow
noise module.- See Also:
-
-
Constructor Details
-
Billow
public Billow()Create a newBillow
module, with all fields initialized to their defaults.
-
-
Method Details
-
octaveCount
public int octaveCount()Returns the number of octaves that generate the billowy noise.The number of octaves controls the amount of detail in the billowy noise.
- Returns:
- the number of octaves that generate the billowy noise.
- See Also:
-
setOctaveCount
public void setOctaveCount(int octaveCount) Sets the number of octaves that generate the billowy noise.The number of octaves controls the amount of detail in the billowy noise.
The larger the number of octaves, the more time required to calculate the billowy-noise value.
- Parameters:
octaveCount
- the number of octaves, from 1 toBILLOW_MAX_OCTAVE
- Throws:
IllegalArgumentException
- if the octave count is out of bounds.
-
frequency
public double frequency()Get the frequency of the first octave.- Returns:
- the frequency of the first octave
- See Also:
-
setFrequency
public void setFrequency(double frequency) Sets the frequency of the first octave.- Parameters:
frequency
- the frequency of the first octave
-
lacunarity
public double lacunarity()Get the lacunarity of the billowy noise.The lacunarity is the frequency multiplier between successive octaves.
- Returns:
- the lacunarity of the billowy noise
- See Also:
-
setLacunarity
public void setLacunarity(double lacunarity) Set the lacunarity of the billowy noise.The lacunarity is the frequency multiplier between successive octaves.
For best results, set the lacunarity to a number between
1.5
and3.5
.- Parameters:
lacunarity
- the lacunarity of the billowy noise
-
quality
Get the quality of the billowy noise.See
NoiseQuality
for definitions of the various coherent-noise qualities.- Returns:
- the quality of the billowy noise
- See Also:
-
setQuality
Sets the quality of the billowy noise.See
NoiseQuality
for definitions of the various coherent-noise qualities.- Parameters:
quality
- the quality of the billowy noise
-
persistence
public double persistence()Get the persistence value of the billowy noise.The persistence value controls the roughness of the billowy noise.
- Returns:
- the persistence value of the billowy noise
- See Also:
-
setPersistence
public void setPersistence(double persistence) Sets the persistence value of the billowy noise.- Parameters:
persistence
- the persistence value of the billowy noise.The persistence value controls the roughness of the billowy noise.
For best results, set the persistence value to a number between
0.0
and1.0
.
-
seed
public int seed()Gets the seed used by the billowy-noise function.- Returns:
- the seed value
- See Also:
-
setSeed
public void setSeed(int seed) Sets the seed value used by the billowy-noise function.- Parameters:
seed
- the seed value
-
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
-