Class Exponent


  • public class Exponent
    extends Module
    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.
    • Constructor Detail

      • Exponent

        public Exponent()
      • Exponent

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

      • getExponent

        public double getExponent()
        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
      • getValue

        public double getValue​(double x,
                               double y,
                               double z)
        Description copied from class: Module
        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 Module.setSourceModule(int, Module) 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 Module.getSourceModuleCount() method.

        Specified by:
        getValue in class Module
        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