public class WhirlingNoise extends SeededNoise implements Noise.Noise2D, Noise.Noise3D, Noise.Noise4D, Noise.Noise6D, java.io.Serializable
SeededNoise
and delegates to it for all methods
except noiseAlt(double, double)
and noiseAlt(double, double, double)
. Normally you should use
SeededNoise directly for new code if you expect to mostly use the inner classes in Noise
for special effects,
or FastNoise
if you want the effects all in one place or to use float
instead of double
.
IntPointHash
, if at all.Modifier and Type | Field and Description |
---|---|
protected static float[][] |
grad3f
The 32 3D vertices of a rhombic triacontahedron.
|
static WhirlingNoise |
instance |
static int[] |
perm_u |
static int[] |
perm_v |
static int[] |
perm_w |
static int[] |
perm_x |
static int[] |
perm_y |
static int[] |
perm_z |
Constructor and Description |
---|
WhirlingNoise() |
WhirlingNoise(long seed) |
Modifier and Type | Method and Description |
---|---|
protected static float |
dotf(float[] g,
float x,
float y,
float z) |
double |
getNoise(double x,
double y)
Delegates to
SeededNoise.noise(double, double, long) with the initial seed given to this object. |
double |
getNoise(double x,
double y,
double z)
Delegates to
SeededNoise.noise(double, double, double, long) with the initial seed given to this object. |
double |
getNoise(double x,
double y,
double z,
double w)
Delegates to
SeededNoise.noise(double, double, double, double, long) with the initial seed given to this object. |
double |
getNoiseWithSeed(double x,
double y,
double z,
double w,
long seed)
Delegates to
SeededNoise.noise(double, double, double, double, long) . |
double |
getNoiseWithSeed(double x,
double y,
double z,
long seed)
Delegates to
SeededNoise.noise(double, double, double, long) . |
double |
getNoiseWithSeed(double x,
double y,
long seed)
Delegates to
SeededNoise.noise(double, double, long) . |
static double |
noise(double xin,
double yin)
Delegates to
SeededNoise.noise(double, double, long) with 123456789 as the seed. |
static double |
noise(double xin,
double yin,
double zin)
Delegates to
SeededNoise.noise(double, double, double, long) with 123456789 as the seed. |
static double |
noise(double x,
double y,
double z,
double w)
Delegates to
SeededNoise.noise(double, double, double, double, long) with 123456789 as the seed. |
static double |
noise(double x,
double y,
double z,
double w,
long seed)
Delegates to
SeededNoise.noise(double, double, double, double, long) . |
static double |
noise(double xin,
double yin,
double zin,
long seed)
Delegates to
SeededNoise.noise(double, double, double, long) . |
static double |
noise(double xin,
double yin,
long seed)
Delegates to
SeededNoise.noise(double, double, long) . |
static float |
noiseAlt(double x,
double y)
2D simplex noise returning a float; extremely similar to
noise(double, double) , but this may be slightly
faster or slightly slower. |
static float |
noiseAlt(double x,
double y,
double z)
3D simplex noise returning a float; extremely similar to
noise(double, double, double) , but this may
be slightly faster or slightly slower. |
getNoise, getNoise, getNoiseWithSeed, getNoiseWithSeed, gradCoord2D, gradCoord3D, gradCoord5D, noise, noise
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNoise, getNoiseWithSeed
public static final WhirlingNoise instance
protected static final float[][] grad3f
public static final int[] perm_x
public static final int[] perm_y
public static final int[] perm_z
public static final int[] perm_w
public static final int[] perm_u
public static final int[] perm_v
public WhirlingNoise()
public WhirlingNoise(long seed)
protected static float dotf(float[] g, float x, float y, float z)
public double getNoise(double x, double y)
SeededNoise.noise(double, double, long)
with the initial seed given to this object.getNoise
in interface Noise.Noise2D
getNoise
in class SeededNoise
x
- X inputy
- Y inputpublic double getNoiseWithSeed(double x, double y, long seed)
SeededNoise.noise(double, double, long)
.getNoiseWithSeed
in interface Noise.Noise2D
getNoiseWithSeed
in class SeededNoise
x
- X inputy
- Y inputseed
- will completely alter the shape of the noise if changed between callspublic double getNoise(double x, double y, double z)
SeededNoise.noise(double, double, double, long)
with the initial seed given to this object.getNoise
in interface Noise.Noise3D
getNoise
in class SeededNoise
x
- X inputy
- Y inputz
- Z inputpublic double getNoiseWithSeed(double x, double y, double z, long seed)
SeededNoise.noise(double, double, double, long)
.getNoiseWithSeed
in interface Noise.Noise3D
getNoiseWithSeed
in class SeededNoise
x
- X inputy
- Y inputz
- Z inputseed
- will completely alter the shape of the noise if changed between callspublic double getNoise(double x, double y, double z, double w)
SeededNoise.noise(double, double, double, double, long)
with the initial seed given to this object.getNoise
in interface Noise.Noise4D
getNoise
in class SeededNoise
x
- X inputy
- Y inputz
- Z inputw
- W input (fourth-dimension)public double getNoiseWithSeed(double x, double y, double z, double w, long seed)
SeededNoise.noise(double, double, double, double, long)
.getNoiseWithSeed
in interface Noise.Noise4D
getNoiseWithSeed
in class SeededNoise
x
- X inputy
- Y inputz
- Z inputw
- W input (fourth-dimension)seed
- will completely alter the shape of the noise if changed between callspublic static double noise(double xin, double yin)
SeededNoise.noise(double, double, long)
with 123456789 as the seed.xin
- X inputyin
- Y inputpublic static double noise(double xin, double yin, long seed)
SeededNoise.noise(double, double, long)
.xin
- X inputyin
- Y inputseed
- will completely alter the shape of the noise if changed between callspublic static double noise(double xin, double yin, double zin)
SeededNoise.noise(double, double, double, long)
with 123456789 as the seed.xin
- X inputyin
- Y inputzin
- Z inputpublic static double noise(double xin, double yin, double zin, long seed)
SeededNoise.noise(double, double, double, long)
.xin
- X inputyin
- Y inputzin
- Z inputseed
- will completely alter the shape of the noise if changed between callspublic static double noise(double x, double y, double z, double w)
SeededNoise.noise(double, double, double, double, long)
with 123456789 as the seed.x
- X inputy
- Y inputz
- Z inputw
- W input (fourth-dimensional)public static double noise(double x, double y, double z, double w, long seed)
SeededNoise.noise(double, double, double, double, long)
.x
- X inputy
- Y inputz
- Z inputw
- W input (fourth-dimensional)seed
- will completely alter the shape of the noise if changed between callspublic static float noiseAlt(double x, double y)
noise(double, double)
, but this may be slightly
faster or slightly slower. This uses its parameters verbatim, so you should apply frequency changes yourself.
This also cannot take a seed, while noise(double, double, long)
can.x
- x inputy
- y inputpublic static float noiseAlt(double x, double y, double z)
noise(double, double, double)
, but this may
be slightly faster or slightly slower. This uses its parameters verbatim, so you should apply frequency changes
yourself. This also cannot take a seed, while noise(double, double, double, long)
can.x
- X inputy
- Y inputz
- Z inputCopyright © Eben Howard 2012–2022. All rights reserved.