Package org.lwjgl.stb
Class STBPerlin
- java.lang.Object
-
- org.lwjgl.stb.STBPerlin
-
public class STBPerlin extends java.lang.Object
Native bindings to stb_perlin.h from the stb library.Revised Perlin noise (3D input, 1D output).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static float
stb_perlin_noise3(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap)
Computes a random value at the coordinate (x,y,z).
-
-
-
Method Detail
-
stb_perlin_noise3
public static float stb_perlin_noise3(float x, float y, float z, int x_wrap, int y_wrap, int z_wrap)
Computes a random value at the coordinate (x,y,z).Adjacent random values are continuous but the noise fluctuates its randomness with period 1, i.e. takes on wholly unrelated values at integer points. Specifically, this implements Ken Perlin's revised noise function from 2002.
The "wrap" parameters can be used to create wraparound noise that wraps at powers of two. The numbers MUST be powers of two. Specify 0 to mean "don't care". (The noise always wraps every 256 due details of the implementation, even if you ask for larger or no wrapping.)
- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinatex_wrap
- 0, or a power of two value that specifies the x wraparound coordinatey_wrap
- 0, or a power of two value that specifies the y wraparound coordinatez_wrap
- 0, or a power of two value that specifies the z wraparound coordinate
-
-