public class SimplexNoise extends PerlinNoise
Based on example code by Stefan Gustavson (stegu@itn.liu.se). Optimisations by Peter Eastman (peastman@drizzle.stanford.edu). Better rank ordering method by Stefan Gustavson in 2012.
This could be sped up even further, but it's useful as is.
Modifier and Type | Field and Description |
---|---|
protected static double |
F2 |
protected static double |
F3 |
protected static double |
G2 |
protected static double |
G22 |
protected static double |
G3 |
protected static double |
G32 |
protected static double |
G33 |
protected int[] |
permMod12 |
protected static double |
SQRT_3 |
Constructor and Description |
---|
SimplexNoise(Random rand)
Creates a simplex noise generator.
|
Modifier and Type | Method and Description |
---|---|
protected static double |
dot(net.glowstone.util.noise.SimplexNoise.Grad g,
double x,
double y) |
protected static double |
dot(net.glowstone.util.noise.SimplexNoise.Grad g,
double x,
double y,
double z) |
static int |
floor(double x) |
protected double[] |
get2dNoise(double[] noise,
double x,
double z,
int sizeX,
int sizeY,
double scaleX,
double scaleY,
double amplitude) |
protected double[] |
get3dNoise(double[] noise,
double x,
double y,
double z,
int sizeX,
int sizeY,
int sizeZ,
double scaleX,
double scaleY,
double scaleZ,
double amplitude) |
double |
noise(double xin,
double yin) |
double |
noise(double xin,
double yin,
double zin) |
getNoise
getInstance, getNoise, getNoise, getNoise, getNoise, getNoise, getNoise
protected static final double SQRT_3
protected static final double F2
protected static final double G2
protected static final double G22
protected static final double F3
protected static final double G3
protected static final double G32
protected static final double G33
protected final int[] permMod12
public SimplexNoise(Random rand)
rand
- the PRNG to usepublic static int floor(double x)
protected static double dot(net.glowstone.util.noise.SimplexNoise.Grad g, double x, double y)
protected static double dot(net.glowstone.util.noise.SimplexNoise.Grad g, double x, double y, double z)
protected double[] get2dNoise(double[] noise, double x, double z, int sizeX, int sizeY, double scaleX, double scaleY, double amplitude)
get2dNoise
in class PerlinNoise
protected double[] get3dNoise(double[] noise, double x, double y, double z, int sizeX, int sizeY, int sizeZ, double scaleX, double scaleY, double scaleZ, double amplitude)
get3dNoise
in class PerlinNoise
public double noise(double xin, double yin)
noise
in class org.bukkit.util.noise.NoiseGenerator
public double noise(double xin, double yin, double zin)
noise
in class org.bukkit.util.noise.PerlinNoiseGenerator
Copyright © 2021. All rights reserved.