Class Invert


  • public class Invert
    extends Module
    Noise module that inverts the output value from a source module.
    Source Modules
    This module requires one source module.
    • Field Detail

      • DEFAULT_MIDDLE

        public static final double DEFAULT_MIDDLE
        The default middle value for an Invert module.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Invert

        public Invert()
      • Invert

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

      • getMiddle

        public double getMiddle()
        Get the middle or 'zero' value to invert around.
        Returns:
        the middle value
        See Also:
        DEFAULT_MIDDLE
      • setMiddle

        public void setMiddle​(double middle)
        Set the middle or 'zero' value to invert around.
        Parameters:
        middle - the middle value
        See Also:
        DEFAULT_MIDDLE
      • 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