Class SimplexNoiseGenerator


public class SimplexNoiseGenerator extends PerlinNoiseGenerator
Generates simplex-based noise.

This is a modified version of the freely published version in the paper by Stefan Gustavson at http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf

  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final double
     
    protected static final int[][]
     
    protected double
     
    protected static final int[][]
     
    protected static final double
     
    protected static final double
     

    Fields inherited from class org.bukkit.util.noise.PerlinNoiseGenerator Link icon

    grad3

    Fields inherited from class org.bukkit.util.noise.NoiseGenerator Link icon

    offsetX, offsetY, offsetZ, perm
  • Constructor Summary Link icon

    Constructors
    Modifier
    Constructor
    Description
    protected
     
     
    Creates a seeded simplex noise generator for the given seed
     
    Creates a seeded simplex noise generator with the given Random
     
    Creates a seeded simplex noise generator for the given world
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    protected static double
    dot(int[] g, double x, double y)
     
    protected static double
    dot(int[] g, double x, double y, double z)
     
    protected static double
    dot(int[] g, double x, double y, double z, double w)
     
    Gets the singleton unseeded instance of this generator
    static double
    getNoise(double xin)
    Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space
    static double
    getNoise(double xin, double yin)
    Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D space
    static double
    getNoise(double xin, double yin, double zin)
    Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D space
    static double
    getNoise(double x, double y, double z, double w)
    Computes and returns the 4D simplex noise for the given coordinates in 4D space
    double
    noise(double xin, double yin)
    Computes and returns the 2D noise for the given coordinates in 2D space
    double
    noise(double xin, double yin, double zin)
    Computes and returns the 3D noise for the given coordinates in 3D space
    double
    noise(double x, double y, double z, double w)
    Computes and returns the 4D simplex noise for the given coordinates in 4D space

    Methods inherited from class org.bukkit.util.noise.PerlinNoiseGenerator Link icon

    getNoise, getNoise, getNoise

    Methods inherited from class org.bukkit.util.noise.NoiseGenerator Link icon

    fade, floor, grad, lerp, noise, noise, noise, noise, noise, noise, noise

    Methods inherited from class java.lang.Object Link icon

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

    • SQRT_3 Link icon

      protected static final double SQRT_3
    • SQRT_5 Link icon

      protected static final double SQRT_5
    • F2 Link icon

      protected static final double F2
    • G2 Link icon

      protected static final double G2
    • G22 Link icon

      protected static final double G22
    • F3 Link icon

      protected static final double F3
      See Also:
    • G3 Link icon

      protected static final double G3
      See Also:
    • F4 Link icon

      protected static final double F4
    • G4 Link icon

      protected static final double G4
    • G42 Link icon

      protected static final double G42
    • G43 Link icon

      protected static final double G43
    • G44 Link icon

      protected static final double G44
    • grad4 Link icon

      protected static final int[][] grad4
    • simplex Link icon

      protected static final int[][] simplex
    • offsetW Link icon

      protected double offsetW
  • Constructor Details Link icon

    • SimplexNoiseGenerator Link icon

      protected SimplexNoiseGenerator()
    • SimplexNoiseGenerator Link icon

      public SimplexNoiseGenerator(@NotNull World world)
      Creates a seeded simplex noise generator for the given world
      Parameters:
      world - World to construct this generator for
    • SimplexNoiseGenerator Link icon

      public SimplexNoiseGenerator(long seed)
      Creates a seeded simplex noise generator for the given seed
      Parameters:
      seed - Seed to construct this generator for
    • SimplexNoiseGenerator Link icon

      public SimplexNoiseGenerator(@NotNull Random rand)
      Creates a seeded simplex noise generator with the given Random
      Parameters:
      rand - Random to construct with
  • Method Details Link icon

    • dot Link icon

      protected static double dot(@NotNull int[] g, double x, double y)
    • dot Link icon

      protected static double dot(@NotNull int[] g, double x, double y, double z)
    • dot Link icon

      protected static double dot(@NotNull int[] g, double x, double y, double z, double w)
    • getNoise Link icon

      public static double getNoise(double xin)
      Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space
      Parameters:
      xin - X coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • getNoise Link icon

      public static double getNoise(double xin, double yin)
      Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D space
      Parameters:
      xin - X coordinate
      yin - Y coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • getNoise Link icon

      public static double getNoise(double xin, double yin, double zin)
      Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D space
      Parameters:
      xin - X coordinate
      yin - Y coordinate
      zin - Z coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • getNoise Link icon

      public static double getNoise(double x, double y, double z, double w)
      Computes and returns the 4D simplex noise for the given coordinates in 4D space
      Parameters:
      x - X coordinate
      y - Y coordinate
      z - Z coordinate
      w - W coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • noise Link icon

      public double noise(double xin, double yin, double zin)
      Description copied from class: NoiseGenerator
      Computes and returns the 3D noise for the given coordinates in 3D space
      Overrides:
      noise in class PerlinNoiseGenerator
      Parameters:
      xin - X coordinate
      yin - Y coordinate
      zin - Z coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • noise Link icon

      public double noise(double xin, double yin)
      Description copied from class: NoiseGenerator
      Computes and returns the 2D noise for the given coordinates in 2D space
      Overrides:
      noise in class NoiseGenerator
      Parameters:
      xin - X coordinate
      yin - Y coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • noise Link icon

      public double noise(double x, double y, double z, double w)
      Computes and returns the 4D simplex noise for the given coordinates in 4D space
      Parameters:
      x - X coordinate
      y - Y coordinate
      z - Z coordinate
      w - W coordinate
      Returns:
      Noise at given location, from range -1 to 1
    • getInstance Link icon

      @NotNull public static SimplexNoiseGenerator getInstance()
      Gets the singleton unseeded instance of this generator
      Returns:
      Singleton