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 intMaximum number of octaves for theBillownoise module.static final doubleDefault frequency for theBillownoise module.static final doubleDefault lacunarity for theBillownoise module.static final intDefault number of octaves for theBillownoise module.static final doubleDefault persistence value for theBillownoise module.static final NoiseQualityDefault noise quality for theBillownoise module.static final intDefault noise seed for theBillownoise module.Fields inherited from class org.spongepowered.noise.module.NoiseModule
sourceModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the frequency of the first octave.doubleget(double x, double y, double z) Generates an output value given the coordinates of the specified input value.doubleGet the lacunarity of the billowy noise.intReturns the number of octaves that generate the billowy noise.doubleGet the persistence value of the billowy noise.quality()Get the quality of the billowy noise.intseed()Gets the seed used by the billowy-noise function.voidsetFrequency(double frequency) Sets the frequency of the first octave.voidsetLacunarity(double lacunarity) Set the lacunarity of the billowy noise.voidsetOctaveCount(int octaveCount) Sets the number of octaves that generate the billowy noise.voidsetPersistence(double persistence) Sets the persistence value of the billowy noise.voidsetQuality(NoiseQuality quality) Sets the quality of the billowy noise.voidsetSeed(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 theBillownoise module.- See Also:
-
DEFAULT_BILLOW_LACUNARITY
public static final double DEFAULT_BILLOW_LACUNARITYDefault lacunarity for theBillownoise module.- See Also:
-
DEFAULT_BILLOW_OCTAVE_COUNT
public static final int DEFAULT_BILLOW_OCTAVE_COUNTDefault number of octaves for theBillownoise module.- See Also:
-
DEFAULT_BILLOW_PERSISTENCE
public static final double DEFAULT_BILLOW_PERSISTENCEDefault persistence value for theBillownoise module.- See Also:
-
DEFAULT_BILLOW_QUALITY
Default noise quality for theBillownoise module. -
DEFAULT_BILLOW_SEED
public static final int DEFAULT_BILLOW_SEEDDefault noise seed for theBillownoise module.- See Also:
-
BILLOW_MAX_OCTAVE
public static final int BILLOW_MAX_OCTAVEMaximum number of octaves for theBillownoise module.- See Also:
-
-
Constructor Details
-
Billow
public Billow()Create a newBillowmodule, 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.5and3.5.- Parameters:
lacunarity- the lacunarity of the billowy noise
-
quality
Get the quality of the billowy noise.See
NoiseQualityfor 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
NoiseQualityfor 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.0and1.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:NoiseModuleGenerates 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:
getin classNoiseModule- Parameters:
x- thexcoordinate of the input valuey- theycoordinate of the input valuez- thezcoordinate of the input value- Returns:
- the output value
-