java.lang.Object
org.spongepowered.noise.module.NoiseModule
org.spongepowered.noise.module.modifier.Exponent

public class Exponent extends NoiseModule
Noise module that maps the output value from a source module onto an exponential curve.

Because most noise modules will output values that range from -1.0 to +1.0, this module first normalizes the output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

Source Modules
This module requires one source module.
  • Field Details

  • Constructor Details

    • Exponent

      public Exponent()
    • Exponent

      public Exponent(NoiseModule source)
      Create a new Exponent module with the source modules pre-configured.
      Parameters:
      source - the input module
  • Method Details

    • exponent

      public double exponent()
      Get the exponent value to apply to the output value from the source module.

      Because most noise modules will output values that range from -1.0 to +1.0, this module first normalizes the output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

      Returns:
      the exponent value
    • setExponent

      public void setExponent(double exponent)
      Set the exponent value to apply to the output value from the source module.

      Because most noise modules will output values that range from -1.0 to +1.0, this module first normalizes the output value (the range becomes 0.0 to 1.0), maps that value onto an exponential curve, then rescales that value back to the original range.

      Parameters:
      exponent - the exponent 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