java.lang.Object
org.spongepowered.noise.module.NoiseModule
org.spongepowered.noise.module.source.Billow

public class Billow extends NoiseModule
Noise module that outputs three-dimensional "billowy" noise.

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 Details

    • DEFAULT_BILLOW_FREQUENCY

      public static final double DEFAULT_BILLOW_FREQUENCY
      Default frequency for the Billow noise module.
      See Also:
    • DEFAULT_BILLOW_LACUNARITY

      public static final double DEFAULT_BILLOW_LACUNARITY
      Default lacunarity for the Billow noise module.
      See Also:
    • DEFAULT_BILLOW_OCTAVE_COUNT

      public static final int DEFAULT_BILLOW_OCTAVE_COUNT
      Default number of octaves for the Billow noise module.
      See Also:
    • DEFAULT_BILLOW_PERSISTENCE

      public static final double DEFAULT_BILLOW_PERSISTENCE
      Default persistence value for the Billow noise module.
      See Also:
    • DEFAULT_BILLOW_QUALITY

      public static final NoiseQuality DEFAULT_BILLOW_QUALITY
      Default noise quality for the Billow noise module.
    • DEFAULT_BILLOW_SEED

      public static final int DEFAULT_BILLOW_SEED
      Default noise seed for the Billow noise module.
      See Also:
    • BILLOW_MAX_OCTAVE

      public static final int BILLOW_MAX_OCTAVE
      Maximum number of octaves for the Billow noise module.
      See Also:
  • Constructor Details

    • Billow

      public Billow()
      Create a new Billow 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 to BILLOW_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 and 3.5.

      Parameters:
      lacunarity - the lacunarity of the billowy noise
    • quality

      public NoiseQuality 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

      public void setQuality(NoiseQuality quality)
      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 and 1.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 a NoModuleException.

      To determine the number of source modules required by this noise module, call the NoiseModule.sourceModuleCount() method.

      Specified by:
      get in class NoiseModule
      Parameters:
      x - the x coordinate of the input value
      y - the y coordinate of the input value
      z - the z coordinate of the input value
      Returns:
      the output value