public class SimplexNoiseGenerator extends PerlinNoiseGenerator
This is a modified version of the freely published version in the paper by Stefan Gustavson at http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
Modifier and Type | Field and Description |
---|---|
protected static double |
F2 |
protected static double |
F3 |
protected static double |
F4 |
protected static double |
G2 |
protected static double |
G22 |
protected static double |
G3 |
protected static double |
G4 |
protected static double |
G42 |
protected static double |
G43 |
protected static double |
G44 |
protected static int[][] |
grad4 |
protected static double |
offsetW |
protected static int[][] |
simplex |
protected static double |
SQRT_3 |
protected static double |
SQRT_5 |
grad3
offsetX, offsetY, offsetZ, perm
Modifier | Constructor and Description |
---|---|
protected |
SimplexNoiseGenerator() |
|
SimplexNoiseGenerator(long seed)
Creates a seeded simplex noise generator for the given seed
|
|
SimplexNoiseGenerator(Random rand)
Creates a seeded simplex noise generator with the given Random
|
|
SimplexNoiseGenerator(World world)
Creates a seeded simplex noise generator for the given world
|
Modifier and Type | Method and Description |
---|---|
protected static double |
dot(int[] g,
double x,
double y) |
protected static double |
dot(int[] g,
double x,
double y,
double z) |
protected static double |
dot(int[] g,
double x,
double y,
double z,
double w) |
static SimplexNoiseGenerator |
getInstance()
Gets the singleton unseeded instance of this generator
|
static double |
getNoise(double xin)
Computes and returns the 1D unseeded simplex noise for the given
coordinates in 1D space
|
static double |
getNoise(double xin,
double yin)
Computes and returns the 2D unseeded simplex noise for the given
coordinates in 2D space
|
static double |
getNoise(double xin,
double yin,
double zin)
Computes and returns the 3D unseeded simplex noise for the given
coordinates in 3D space
|
static double |
getNoise(double x,
double y,
double z,
double w)
Computes and returns the 4D simplex noise for the given coordinates in
4D space
|
double |
noise(double xin,
double yin)
Computes and returns the 2D noise for the given coordinates in 2D space
|
double |
noise(double xin,
double yin,
double zin)
Computes and returns the 3D noise for the given coordinates in 3D space
|
double |
noise(double x,
double y,
double z,
double w)
Computes and returns the 4D simplex noise for the given coordinates in
4D space
|
getNoise, getNoise, getNoise
protected static final double SQRT_3
protected static final double SQRT_5
protected static final double F2
protected static final double G2
protected static final double G22
protected static final double F3
protected static final double G3
protected static final double F4
protected static final double G4
protected static final double G42
protected static final double G43
protected static final double G44
protected static final int[][] grad4
protected static final int[][] simplex
protected static double offsetW
protected SimplexNoiseGenerator()
public SimplexNoiseGenerator(World world)
world
- World to construct this generator forpublic SimplexNoiseGenerator(long seed)
seed
- Seed to construct this generator forpublic SimplexNoiseGenerator(Random rand)
rand
- Random to construct withprotected static double dot(int[] g, double x, double y)
protected static double dot(int[] g, double x, double y, double z)
protected static double dot(int[] g, double x, double y, double z, double w)
public static double getNoise(double xin)
xin
- X coordinatepublic static double getNoise(double xin, double yin)
xin
- X coordinateyin
- Y coordinatepublic static double getNoise(double xin, double yin, double zin)
xin
- X coordinateyin
- Y coordinatezin
- Z coordinatepublic static double getNoise(double x, double y, double z, double w)
x
- X coordinatey
- Y coordinatez
- Z coordinatew
- W coordinatepublic double noise(double xin, double yin, double zin)
NoiseGenerator
noise
in class PerlinNoiseGenerator
xin
- X coordinateyin
- Y coordinatezin
- Z coordinatepublic double noise(double xin, double yin)
NoiseGenerator
noise
in class NoiseGenerator
xin
- X coordinateyin
- Y coordinatepublic double noise(double x, double y, double z, double w)
x
- X coordinatey
- Y coordinatez
- Z coordinatew
- W coordinatepublic static SimplexNoiseGenerator getInstance()
Copyright © 2017. All rights reserved.