Class NoiseGenerator

java.lang.Object
rosequartz.rng.NoiseGenerator

public final class NoiseGenerator extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a noise generator with a random seed.
    NoiseGenerator​(long seed)
    Creates a noise generator from a seed to use.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    getOpenSimplex​(float x, float y, float z)
    Returns the value of an open simplex noise map at the given coordinates for the current seed.
    float
    getPerlin​(float x, float y, float z)
    Returns the value of a perlin noise map at the given coordinates for the current seed.
    long
    Gets the current seed used to generate from.
    setSeed​(long seed)
    Sets the seed to generate from.

    Methods inherited from class java.lang.Object

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

    • NoiseGenerator

      public NoiseGenerator()
      Creates a noise generator with a random seed.
    • NoiseGenerator

      public NoiseGenerator(long seed)
      Creates a noise generator from a seed to use.
      Parameters:
      seed - the seed to generate from
  • Method Details

    • setSeed

      public NoiseGenerator setSeed(long seed)
      Sets the seed to generate from.
      Parameters:
      seed - seed to use
      Returns:
      this
    • getSeed

      public long getSeed()
      Gets the current seed used to generate from.
      Returns:
      current seed
    • getPerlin

      public float getPerlin(float x, float y, float z)
      Returns the value of a perlin noise map at the given coordinates for the current seed.
      Parameters:
      x - x-coordinate on the noise map
      y - y-coordinate on the noise map
      z - z-coordinate on the noise map
      Returns:
      the value
    • getOpenSimplex

      public float getOpenSimplex(float x, float y, float z)
      Returns the value of an open simplex noise map at the given coordinates for the current seed.
      Parameters:
      x - x-coordinate on the noise map
      y - y-coordinate on the noise map
      z - z-coordinate on the noise map
      Returns:
      the value