Class WorleyNoiseGenerator
java.lang.Object
de.articdive.jnoise.generators.noisegen.worley.WorleyNoiseGenerator
- All Implemented Interfaces:
ExplicitNoiseGenerator<WorleyNoiseResult>
,NoiseGenerator
,SeededExplicitNoiseGenerator<WorleyNoiseResult>
,SeededNoiseGenerator
,ExplicitNoiseSource<WorleyNoiseResult>
,NoiseSource
@NullMarked
public final class WorleyNoiseGenerator
extends Object
implements SeededExplicitNoiseGenerator<WorleyNoiseResult>
The bounds of the worley noise implementation heavily depend on the distance functions,
they will be in the interval of: [0.0,
Double.MAX_VALUE
], it is highly recommended to clamp the output.
The more feature points there are, the lower the upper bound will be.
if no feature points exist, then the distance will be Double.MAX_VALUE
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
evaluateNoise
(double x) Evaluates noise at a 1D point.double
evaluateNoise
(double x, double y) Evaluates noise at a 2D point.double
evaluateNoise
(double x, double y, double z) Evaluates noise at a 3D point.double
evaluateNoise
(double x, double y, double z, double w) Evaluates noise at a 4D point.double
evaluateNoise
(double x, double y, double z, double w, long seed) Evaluates noise at a 4D point.double
evaluateNoise
(double x, double y, double z, long seed) Evaluates noise at a 3D point.double
evaluateNoise
(double x, double y, long seed) Evaluates noise at a 2D point.double
evaluateNoise
(double x, long seed) Evaluates noise at a 1D point.evaluateNoiseResult
(double x) Evaluates noise at a 1D point.evaluateNoiseResult
(double x, double y) Evaluates noise at a 2D point.evaluateNoiseResult
(double x, double y, double z) Evaluates noise at a 3D point.evaluateNoiseResult
(double x, double y, double z, double w) Evaluates noise at a 4D point.evaluateNoiseResult
(double x, double y, double z, double w, long seed) Evaluates noise at a 4D point.evaluateNoiseResult
(double x, double y, double z, long seed) Evaluates noise at a 3D point.evaluateNoiseResult
(double x, double y, long seed) Evaluates noise at a 2D point.evaluateNoiseResult
(double x, long seed) Evaluates noise at a 1D point.long
getSeed()
Returns the seed of the seeded noise generator.Gets aWorleyNoiseGenerator.WorleyNoiseBuilder
to build aWorleyNoiseGenerator
.
-
Method Details
-
evaluateNoise
public double evaluateNoise(double x, long seed) Description copied from interface:SeededNoiseGenerator
Evaluates noise at a 1D point.- Specified by:
evaluateNoise
in interfaceSeededNoiseGenerator
- Parameters:
x
- X-Coordinate of the 1D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
- noise value at the 1D point.
-
evaluateNoise
public double evaluateNoise(double x, double y, long seed) Description copied from interface:SeededNoiseGenerator
Evaluates noise at a 2D point.- Specified by:
evaluateNoise
in interfaceSeededNoiseGenerator
- Parameters:
x
- X-Coordinate of the 2D point.y
- Y-Coordinate of the 2D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
- noise value at the 2D point.
-
evaluateNoise
public double evaluateNoise(double x, double y, double z, long seed) Description copied from interface:SeededNoiseGenerator
Evaluates noise at a 3D point.- Specified by:
evaluateNoise
in interfaceSeededNoiseGenerator
- Parameters:
x
- X-Coordinate of the 3D point.y
- Y-Coordinate of the 3D point.z
- Z-Coordinate of the 3D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
- noise value at the 3D point.
-
evaluateNoise
public double evaluateNoise(double x, double y, double z, double w, long seed) Description copied from interface:SeededNoiseGenerator
Evaluates noise at a 4D point.- Specified by:
evaluateNoise
in interfaceSeededNoiseGenerator
- Parameters:
x
- X-Coordinate of the 4D point.y
- Y-Coordinate of the 4D point.z
- Z-Coordinate of the 4D point.w
- W-Coordinate of the 4D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
- noise value at the 4D point.
-
evaluateNoise
public double evaluateNoise(double x) Description copied from interface:NoiseSource
Evaluates noise at a 1D point.- Specified by:
evaluateNoise
in interfaceNoiseSource
- Parameters:
x
- X-Coordinate of the 1D point.- Returns:
- noise value at the 1D point.
-
evaluateNoise
public double evaluateNoise(double x, double y) Description copied from interface:NoiseSource
Evaluates noise at a 2D point.- Specified by:
evaluateNoise
in interfaceNoiseSource
- Parameters:
x
- X-Coordinate of the 2D point.y
- Y-Coordinate of the 2D point.- Returns:
- noise value at the 2D point.
-
evaluateNoise
public double evaluateNoise(double x, double y, double z) Description copied from interface:NoiseSource
Evaluates noise at a 3D point.- Specified by:
evaluateNoise
in interfaceNoiseSource
- Parameters:
x
- X-Coordinate of the 3D point.y
- Y-Coordinate of the 3D point.z
- Z-Coordinate of the 3D point.- Returns:
- noise value at the 3D point.
-
evaluateNoise
public double evaluateNoise(double x, double y, double z, double w) Description copied from interface:NoiseSource
Evaluates noise at a 4D point.- Specified by:
evaluateNoise
in interfaceNoiseSource
- Parameters:
x
- X-Coordinate of the 4D point.y
- Y-Coordinate of the 4D point.z
- Z-Coordinate of the 4D point.w
- W-Coordinate of the 4D point.- Returns:
- noise value at the 4D point.
-
evaluateNoiseResult
Description copied from interface:SeededExplicitNoiseGenerator
Evaluates noise at a 1D point.- Specified by:
evaluateNoiseResult
in interfaceSeededExplicitNoiseGenerator<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 1D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
SeededExplicitNoiseGenerator
denoting the noise value at the 1D point.
-
evaluateNoiseResult
Description copied from interface:SeededExplicitNoiseGenerator
Evaluates noise at a 2D point.- Specified by:
evaluateNoiseResult
in interfaceSeededExplicitNoiseGenerator<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 2D point.y
- Y-Coordinate of the 2D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
SeededExplicitNoiseGenerator
denoting the noise value at the 2D point.
-
evaluateNoiseResult
Description copied from interface:SeededExplicitNoiseGenerator
Evaluates noise at a 3D point.- Specified by:
evaluateNoiseResult
in interfaceSeededExplicitNoiseGenerator<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 3D point.y
- Y-Coordinate of the 3D point.z
- Z-Coordinate of the 3D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
SeededExplicitNoiseGenerator
denoting the noise value at the 3D point.
-
evaluateNoiseResult
Description copied from interface:SeededExplicitNoiseGenerator
Evaluates noise at a 4D point.- Specified by:
evaluateNoiseResult
in interfaceSeededExplicitNoiseGenerator<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 4D point.y
- Y-Coordinate of the 4D point.z
- Z-Coordinate of the 4D point.w
- W-Coordinate of the 4D point.seed
- seed for theSeededNoiseGenerator
to use.- Returns:
SeededExplicitNoiseGenerator
denoting the noise value at the 4D point.
-
evaluateNoiseResult
Description copied from interface:ExplicitNoiseSource
Evaluates noise at a 1D point.- Specified by:
evaluateNoiseResult
in interfaceExplicitNoiseSource<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 1D point.- Returns:
ExplicitNoiseSource
denoting the noise value at the 1D point.
-
evaluateNoiseResult
Description copied from interface:ExplicitNoiseSource
Evaluates noise at a 2D point.- Specified by:
evaluateNoiseResult
in interfaceExplicitNoiseSource<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 2D point.y
- Y-Coordinate of the 2D point.- Returns:
ExplicitNoiseSource
denoting the noise value at the 2D point.
-
evaluateNoiseResult
Description copied from interface:ExplicitNoiseSource
Evaluates noise at a 3D point.- Specified by:
evaluateNoiseResult
in interfaceExplicitNoiseSource<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 3D point.y
- Y-Coordinate of the 3D point.z
- Z-Coordinate of the 3D point.- Returns:
ExplicitNoiseSource
denoting the noise value at the 3D point.
-
evaluateNoiseResult
Description copied from interface:ExplicitNoiseSource
Evaluates noise at a 4D point.- Specified by:
evaluateNoiseResult
in interfaceExplicitNoiseSource<WorleyNoiseResult>
- Parameters:
x
- X-Coordinate of the 4D point.y
- Y-Coordinate of the 4D point.z
- Z-Coordinate of the 4D point.w
- W-Coordinate of the 4D point.- Returns:
ExplicitNoiseSource
denoting the noise value at the 4D point.
-
getSeed
public long getSeed()Description copied from interface:SeededNoiseGenerator
Returns the seed of the seeded noise generator.- Specified by:
getSeed
in interfaceSeededNoiseGenerator
- Returns:
- seed value of the noise generator.
-
newBuilder
Gets aWorleyNoiseGenerator.WorleyNoiseBuilder
to build aWorleyNoiseGenerator
.- Returns:
WorleyNoiseGenerator.WorleyNoiseBuilder
.
-