Package net.glowstone.util.noise
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
FieldsModifier and TypeFieldDescriptionprotected double[]protected final intprotected final intprotected final intFields inherited from class org.bukkit.util.noise.OctaveGenerator
octaves, xScale, yScale, zScale -
Constructor Summary
ConstructorsConstructorDescriptionPerlinOctaveGenerator(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 TypeMethodDescriptionprotected static org.bukkit.util.noise.NoiseGenerator[]createOctaves(Random rand, int octaves) protected static longfloor(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.intgetSizeX()intgetSizeY()intgetSizeZ()Methods inherited from class org.bukkit.util.noise.OctaveGenerator
getOctaves, getXScale, getYScale, getZScale, noise, noise, noise, noise, noise, noise, setScale, setXScale, setYScale, setZScale
-
Field Details
-
sizeX
protected final int sizeX -
sizeY
protected final int sizeY -
sizeZ
protected final int sizeZ -
noise
protected double[] noise
-
-
Constructor Details
-
PerlinOctaveGenerator
-
PerlinOctaveGenerator
-
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 generatorsrand- the PRNGsizeX- the size on the X axissizeY- the size on the Y axissizeZ- the size on the Z axis
-
-
Method Details
-
createOctaves
-
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 coordinatez- the starting Z coordinatelacunarity- layer n's frequency as a fraction of layern - 1's frequencypersistence- layer n's amplitude as a multiple of layern - 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 coordinatey- the starting Y coordinatez- the starting Z coordinatelacunarity- layer n's frequency as a fraction of layern - 1's frequencypersistence- layer n's amplitude as a multiple of layern - 1's amplitude- Returns:
- The noise array
-
getSizeX
public int getSizeX() -
getSizeY
public int getSizeY() -
getSizeZ
public int getSizeZ()
-