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

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

The get(double, double, double) method moves the (x, y, z) coordinates of the input value by a translation amount before returning the output value from the source module. To set the translation amount, call the setTranslations(double, double, double) method. To set the translation amount to apply to the individual x, y, or z coordinates, call the setXTranslation(double), setYTranslation(double), or setZTranslation(double) methods, respectively.

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

    • DEFAULT_TRANSLATE_POINT_X

      public static final double DEFAULT_TRANSLATE_POINT_X
      Default translation factor applied to the x coordinate for the TranslatePoint noise module.
      See Also:
    • DEFAULT_TRANSLATE_POINT_Y

      public static final double DEFAULT_TRANSLATE_POINT_Y
      Default translation factor applied to the y coordinate for the TranslatePoint noise module.
      See Also:
    • DEFAULT_TRANSLATE_POINT_Z

      public static final double DEFAULT_TRANSLATE_POINT_Z
      Default translation factor applied to the z coordinate for the TranslatePoint noise module.
      See Also:
  • Constructor Details

    • TranslatePoint

      public TranslatePoint()
    • TranslatePoint

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

    • xTranslation

      public double xTranslation()
      Get the translation amount to apply to the x coordinate of the input value.
      Returns:
      the translation amount to apply to the x coordinate
      See Also:
    • setXTranslation

      public void setXTranslation(double xTranslation)
      Set the translation amount to apply to the x coordinate of the input value.

      The get(double, double, double) method moves the (x, y, z) coordinates of the input value by a translation amount before returning the output value from the source module.

      Parameters:
      xTranslation - the translation amount to apply to the x coordinate
    • yTranslation

      public double yTranslation()
      Get the translation amount to apply to the y coordinate of the input value.
      Returns:
      the translation amount to apply to the y coordinate
      See Also:
    • setYTranslation

      public void setYTranslation(double yTranslation)
      Set the translation amount to apply to the y coordinate of the input value.

      The get(double, double, double) method moves the (x, y, z) coordinates of the input value by a translation amount before returning the output value from the source module.

      Parameters:
      yTranslation - the translation amount to apply to the y coordinate
    • zTranslation

      public double zTranslation()
      Get the translation amount to apply to the z coordinate of the input value.
      Returns:
      the translation amount to apply to the z coordinate
      See Also:
    • setZTranslation

      public void setZTranslation(double zTranslation)
      Set the translation amount to apply to the z coordinate of the input value.

      The get(double, double, double) method moves the (x, y, z) coordinates of the input value by a translation amount before returning the output value from the source module.

      Parameters:
      zTranslation - the translation amount to apply to the z coordinate
    • setTranslations

      public void setTranslations(double x, double y, double z)
      Set the translation amount to apply to the (x, y, z) coordinates of the input value.

      The get(double, double, double) method moves the (x, y, z) coordinates of the input value by a translation amount before returning the output value from the source module.

      Parameters:
      x - the translation amount to apply to the x coordinate
      y - the translation amount to apply to the y coordinate
      z - the translation amount to apply to the z coordinate
    • 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