Class SimplexNoise
java.lang.Object
net.minecraft.world.level.levelgen.synth.SimplexNoise
A generator for a single octave of Simplex noise.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static double
dot
(int[] pGradient, double pX, double pY, double pZ) private double
getCornerNoise3D
(int pGradientIndex, double pX, double pY, double pZ, double pOffset) double
getValue
(double pX, double pY) double
getValue
(double pX, double pY, double pZ) private int
p
(int pIndex)
-
Field Details
-
GRADIENT
protected static final int[][] GRADIENT -
SQRT_3
private static final double SQRT_3 -
F2
private static final double F2 -
G2
private static final double G2 -
p
private final int[] pA permutation array used in noise generation. This is populated with the values [0, 256) and shuffled. Despite the array declared as 512 length, only the first 256 values are used.- See Also:
-
xo
public final double xo -
yo
public final double yo -
zo
public final double zo
-
-
Constructor Details
-
SimplexNoise
-
-
Method Details
-
p
private int p(int pIndex) -
dot
protected static double dot(int[] pGradient, double pX, double pY, double pZ) - Returns:
- The dot product of the provided three-dimensional gradient vector and the vector (x, y, z)
-
getCornerNoise3D
private double getCornerNoise3D(int pGradientIndex, double pX, double pY, double pZ, double pOffset) -
getValue
public double getValue(double pX, double pY) -
getValue
public double getValue(double pX, double pY, double pZ)
-