Class ScaleTransformer

java.lang.Object
de.articdive.jnoise.transformers.scale.ScaleTransformer
All Implemented Interfaces:
SimpleTransformer

@NullMarked public final class ScaleTransformer extends Object implements SimpleTransformer
Simplistic Scale transformer (Frequency transformer) that multiplies each coordinate part by the specified scale value.
  • Constructor Details

    • ScaleTransformer

      public ScaleTransformer(double scale)
      Parameters:
      scale - scale value for all dimensions.
    • ScaleTransformer

      public ScaleTransformer(double scaleX, double scaleY, double scaleZ, double scaleW)
      Parameters:
      scaleX - scale value for the X-dimension.
      scaleY - scale value for the Y-dimension.
      scaleZ - scale value for the Z-dimension.
      scaleW - scale value for the W-dimension.
  • Method Details

    • transformX

      public double transformX(double x)
      Description copied from interface: SimpleTransformer
      Transforms an x coordinate before noise evaluation.
      Specified by:
      transformX in interface SimpleTransformer
      Parameters:
      x - coordinate to transform.
      Returns:
      transformed x coordinate.
    • transformY

      public double transformY(double y)
      Description copied from interface: SimpleTransformer
      Transforms a y coordinate before noise evaluation.
      Specified by:
      transformY in interface SimpleTransformer
      Parameters:
      y - coordinate to transform.
      Returns:
      transformed y coordinate.
    • transformZ

      public double transformZ(double z)
      Description copied from interface: SimpleTransformer
      Transforms a z coordinate before noise evaluation.
      Specified by:
      transformZ in interface SimpleTransformer
      Parameters:
      z - coordinate to transform.
      Returns:
      transformed z coordinate.
    • transformW

      public double transformW(double w)
      Description copied from interface: SimpleTransformer
      Transforms a w coordinate before noise evaluation.
      Specified by:
      transformW in interface SimpleTransformer
      Parameters:
      w - coordinate to transform.
      Returns:
      transformed w coordinate.