|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.util.noise.NoiseGenerator org.bukkit.util.noise.PerlinNoiseGenerator org.bukkit.util.noise.SimplexNoiseGenerator
public class SimplexNoiseGenerator
Generates simplex-based noise.
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
Field Summary | |
---|---|
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
|
Fields inherited from class org.bukkit.util.noise.PerlinNoiseGenerator |
---|
grad3 |
Fields inherited from class org.bukkit.util.noise.NoiseGenerator |
---|
offsetX, offsetY, offsetZ, perm |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class org.bukkit.util.noise.PerlinNoiseGenerator |
---|
getNoise, getNoise, getNoise |
Methods inherited from class org.bukkit.util.noise.NoiseGenerator |
---|
fade, floor, grad, lerp, noise, noise, noise, noise, noise, noise, noise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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 withMethod Detail |
---|
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)
public static double getNoise(double xin)
xin
- X coordinate
public static double getNoise(double xin, double yin)
xin
- X coordinateyin
- Y coordinate
public static double getNoise(double xin, double yin, double zin)
xin
- X coordinateyin
- Y coordinatezin
- Z coordinate
public static double getNoise(double x, double y, double z, double w)
x
- X coordinatey
- Y coordinatez
- Z coordinatew
- W coordinate
public double noise(double xin, double yin, double zin)
NoiseGenerator
noise
in class PerlinNoiseGenerator
xin
- X coordinateyin
- Y coordinatezin
- Z coordinate
public double noise(double xin, double yin)
NoiseGenerator
noise
in class NoiseGenerator
xin
- X coordinateyin
- Y coordinate
public double noise(double x, double y, double z, double w)
x
- X coordinatey
- Y coordinatez
- Z coordinatew
- W coordinate
public static SimplexNoiseGenerator getInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |