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

public class ScalePoint extends NoiseModule
Noise module that scales the coordinates of the input value before returning the output value from a source module.

The get(double, double, double) method multiplies the (x, y, z) coordinates of the input value with a scaling factor before returning the output value from the source module.

To set the scaling factor, call the setScale(double) method. To set the scaling factor to apply to the individual x, y, or z coordinates, call the setXScale(double), setYScale(double), or setZScale(double) methods, respectively.

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

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Default scaling factor applied to the x coordinate for the ScalePoint noise module.
    static final double
    Default scaling factor applied to the y coordinate for the ScalePoint noise module.
    static final double
    Default scaling factor applied to the z coordinate for the ScalePoint noise module.

    Fields inherited from class org.spongepowered.noise.module.NoiseModule

    sourceModule
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Create a new ScalePoint module with the source modules pre-configured.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(double x, double y, double z)
    Generates an output value given the coordinates of the specified input value.
    void
    setScale(double scale)
    Set the scaling factor to apply to the input value.
    void
    setXScale(double xScale)
    Set the scaling factor to apply to the x coordinate of the input value.
    void
    setYScale(double yScale)
    Set the scaling factor to apply to the y coordinate of the input value.
    void
    setZScale(double zScale)
    Set the scaling factor to apply to the z coordinate of the input value.
    double
    Get the scaling factor applied to the x coordinate of the input value.
    double
    Get the scaling factor applied to the y coordinate of the input value.
    double
    Get the scaling factor applied to the z coordinate of the input value.

    Methods inherited from class org.spongepowered.noise.module.NoiseModule

    setSourceModule, sourceModule, sourceModuleCount

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_SCALE_POINT_X

      public static final double DEFAULT_SCALE_POINT_X
      Default scaling factor applied to the x coordinate for the ScalePoint noise module.
      See Also:
    • DEFAULT_SCALE_POINT_Y

      public static final double DEFAULT_SCALE_POINT_Y
      Default scaling factor applied to the y coordinate for the ScalePoint noise module.
      See Also:
    • DEFAULT_SCALE_POINT_Z

      public static final double DEFAULT_SCALE_POINT_Z
      Default scaling factor applied to the z coordinate for the ScalePoint noise module.
      See Also:
  • Constructor Details

    • ScalePoint

      public ScalePoint()
    • ScalePoint

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

    • xScale

      public double xScale()
      Get the scaling factor applied to the x coordinate of the input value.
      Returns:
      the scaling factor applied to the x coordinate
      See Also:
    • setXScale

      public void setXScale(double xScale)
      Set the scaling factor to apply to the x coordinate of the input value.

      The get(double, double, double) method multiplies the (x, y, z) coordinates of the input value with a scaling factor before returning the output value from the source module.

      Parameters:
      xScale - the scaling factor to apply to the x coordinate
    • yScale

      public double yScale()
      Get the scaling factor applied to the y coordinate of the input value.
      Returns:
      the scaling factor applied to the y coordinate
      See Also:
    • setYScale

      public void setYScale(double yScale)
      Set the scaling factor to apply to the y coordinate of the input value.

      The get(double, double, double) method multiplies the (x, y, z) coordinates of the input value with a scaling factor before returning the output value from the source module.

      Parameters:
      yScale - the scaling factor to apply to the y coordinate
    • zScale

      public double zScale()
      Get the scaling factor applied to the z coordinate of the input value.
      Returns:
      the scaling factor applied to the z coordinate
      See Also:
    • setZScale

      public void setZScale(double zScale)
      Set the scaling factor to apply to the z coordinate of the input value.

      The get(double, double, double) method multiplies the (x, y, z) coordinates of the input value with a scaling factor before returning the output value from the source module.

      Parameters:
      zScale - the scaling factor to apply to the z coordinate
    • setScale

      public void setScale(double scale)
      Set the scaling factor to apply to the input value.

      The get(double, double, double) method multiplies the (x, y, z) coordinates of the input value with a scaling factor before returning the output value from the source module.

      Parameters:
      scale - the scaling factor to apply
    • 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