Package squidpony.squidmath
Class ValueNoise
java.lang.Object
squidpony.squidmath.ValueNoise
- All Implemented Interfaces:
Noise.Noise1D
,Noise.Noise2D
,Noise.Noise3D
,Noise.Noise4D
public class ValueNoise extends Object implements Noise.Noise1D, Noise.Noise2D, Noise.Noise3D, Noise.Noise4D
A low-quality continuous noise generator with strong grid artifacts, this is nonetheless useful as a building block.
This implements Noise2D, Noise3D, and Noise4D, and could have more dimensionality support added later. It has much
lower quality than
Note: the
ClassicNoise
, but is structured similarly in many ways, and should be a little faster.
Note: the
valueNoise(int, double, double)
methods in this class return results in the range of 0.0 to 1.0,
while the getNoise(double, double)
and getNoiseWithSeed(double, double, long)
methods use the Noise
class default range of -1.0 to 1.0.-
Field Summary
Fields Modifier and Type Field Description static ValueNoise
instance
int
seed
-
Constructor Summary
Constructors Constructor Description ValueNoise()
ValueNoise(int seed)
ValueNoise(long seed)
-
Method Summary
Modifier and Type Method Description double
getNoise(double x)
double
getNoise(double x, double y)
double
getNoise(double x, double y, double z)
double
getNoise(double x, double y, double z, double w)
double
getNoiseWithSeed(double x, double y, double z, double w, long seed)
double
getNoiseWithSeed(double x, double y, double z, long seed)
double
getNoiseWithSeed(double x, double y, long seed)
double
getNoiseWithSeed(double x, long seed)
static double
valueNoise(int seed, double x)
static double
valueNoise(int seed, double x, double y)
static double
valueNoise(int seed, double x, double y, double z)
static double
valueNoise(int seed, double x, double y, double z, double w)
static double
valueNoise(int seed, double x, double y, double z, double w, double u, double v)
-
Field Details
-
Constructor Details
-
ValueNoise
public ValueNoise() -
ValueNoise
-
ValueNoise
-
-
Method Details
-
valueNoise
-
valueNoise
-
valueNoise
-
valueNoise
-
valueNoise
public static double valueNoise(int seed, double x, double y, double z, double w, double u, double v) -
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise1D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise1D
-
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise2D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise2D
-
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise3D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise3D
-
getNoise
- Specified by:
getNoise
in interfaceNoise.Noise4D
-
getNoiseWithSeed
- Specified by:
getNoiseWithSeed
in interfaceNoise.Noise4D
-