Class PerlinOctaveGenerator

java.lang.Object
org.bukkit.util.noise.OctaveGenerator
net.glowstone.util.noise.PerlinOctaveGenerator
Direct Known Subclasses:
SimplexOctaveGenerator

public class PerlinOctaveGenerator extends org.bukkit.util.noise.OctaveGenerator
  • Field Summary

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

    Fields inherited from class org.bukkit.util.noise.OctaveGenerator

    octaves, xScale, yScale, zScale
  • Constructor Summary

    Constructors
    Constructor
    Description
    PerlinOctaveGenerator(Random rand, int octaves, int sizeX, int sizeZ)
     
    PerlinOctaveGenerator(Random rand, int octaves, int sizeX, int sizeY, int sizeZ)
     
    PerlinOctaveGenerator(org.bukkit.util.noise.NoiseGenerator[] octaves, Random rand, int sizeX, int sizeY, int sizeZ)
    Creates a generator for multiple layers of Perlin noise.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static org.bukkit.util.noise.NoiseGenerator[]
    createOctaves(Random rand, int octaves)
     
    protected static long
    floor(double x)
     
    double[]
    getFractalBrownianMotion(double x, double z, double lacunarity, double persistence)
    Generates multiple layers of noise.
    double[]
    getFractalBrownianMotion(double x, double y, double z, double lacunarity, double persistence)
    Generates multiple layers of noise.
    int
     
    int
     
    int
     

    Methods inherited from class org.bukkit.util.noise.OctaveGenerator

    getOctaves, getXScale, getYScale, getZScale, noise, noise, noise, noise, noise, noise, setScale, setXScale, setYScale, setZScale

    Methods inherited from class java.lang.Object

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

    • sizeX

      protected final int sizeX
    • sizeY

      protected final int sizeY
    • sizeZ

      protected final int sizeZ
    • noise

      protected double[] noise
  • Constructor Details

    • PerlinOctaveGenerator

      public PerlinOctaveGenerator(Random rand, int octaves, int sizeX, int sizeZ)
    • PerlinOctaveGenerator

      public PerlinOctaveGenerator(Random rand, int octaves, int sizeX, int sizeY, int sizeZ)
    • PerlinOctaveGenerator

      public PerlinOctaveGenerator(org.bukkit.util.noise.NoiseGenerator[] octaves, Random rand, int sizeX, int sizeY, int sizeZ)
      Creates a generator for multiple layers of Perlin noise.
      Parameters:
      octaves - the noise generators
      rand - the PRNG
      sizeX - the size on the X axis
      sizeY - the size on the Y axis
      sizeZ - the size on the Z axis
  • Method Details

    • createOctaves

      protected static org.bukkit.util.noise.NoiseGenerator[] createOctaves(Random rand, int octaves)
    • floor

      protected static long floor(double x)
    • getFractalBrownianMotion

      public double[] getFractalBrownianMotion(double x, double z, double lacunarity, double persistence)
      Generates multiple layers of noise.
      Parameters:
      x - the starting X coordinate
      z - the starting Z coordinate
      lacunarity - layer n's frequency as a fraction of layer n - 1's frequency
      persistence - layer n's amplitude as a multiple of layer n - 1's amplitude
      Returns:
      The noise array
    • getFractalBrownianMotion

      public double[] getFractalBrownianMotion(double x, double y, double z, double lacunarity, double persistence)
      Generates multiple layers of noise.
      Parameters:
      x - the starting X coordinate
      y - the starting Y coordinate
      z - the starting Z coordinate
      lacunarity - layer n's frequency as a fraction of layer n - 1's frequency
      persistence - layer n's amplitude as a multiple of layer n - 1's amplitude
      Returns:
      The noise array
    • getSizeX

      public int getSizeX()
    • getSizeY

      public int getSizeY()
    • getSizeZ

      public int getSizeZ()