public class SimplexNoiseGenerator extends PerlinNoiseGenerator
原文:Generates simplex-based noise.
这是一个免费发布的修正版论文,作者是Stefan Gustavson,链接: http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf.
原文: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
限定符和类型 | 字段和说明 |
---|---|
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 double |
offsetW |
protected static int[][] |
simplex |
protected static double |
SQRT_3 |
protected static double |
SQRT_5 |
grad3
offsetX, offsetY, offsetZ, perm
限定符 | 构造器和说明 |
---|---|
protected |
SimplexNoiseGenerator() |
|
SimplexNoiseGenerator(long seed)
使用给定的种子创建一个已设种子的SimplexNoiseGenerator.
|
|
SimplexNoiseGenerator(java.util.Random rand)
使用给定的Random创建一个已设种子的SimplexNoiseGenerator.
|
|
SimplexNoiseGenerator(World world)
使用给定的World创建一个已设种子的SimplexNoiseGenerator.
|
限定符和类型 | 方法和说明 |
---|---|
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()
获取单独的未设种子的此类Generator的实例.
|
static double |
getNoise(double xin)
给定一维空间坐标计算并返回一维的未设种子的单纯形噪声.
|
static double |
getNoise(double xin,
double yin)
给定二维空间坐标计算并返回二维的未设种子的单纯形噪声.
|
static double |
getNoise(double xin,
double yin,
double zin)
给定三维空间坐标计算并返回三维的未设种子的单纯形噪声.
|
static double |
getNoise(double x,
double y,
double z,
double w)
给定四维空间坐标计算并返回四维的单纯形噪声.
|
double |
noise(double xin,
double yin)
计算并返回给定坐标在二维空间中的二维噪音。
|
double |
noise(double xin,
double yin,
double zin)
计算并返回给定坐标在三维空间中的三维噪音。
|
double |
noise(double x,
double y,
double z,
double w)
计算并返回四维的单纯形噪声对于给定的四维空间坐标.
|
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 double offsetW
protected SimplexNoiseGenerator()
public SimplexNoiseGenerator(World world)
原文:Creates a seeded simplex noise generator for the given world
world
- 创建这个Generator的World实例public SimplexNoiseGenerator(long seed)
原文:Creates a seeded simplex noise generator for the given seed
seed
- 创建这个Generator的long型种子public SimplexNoiseGenerator(java.util.Random rand)
原文:Creates a seeded simplex noise generator with the given Random
rand
- 创建这个Generator的Randomprotected 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)
原文:Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space
xin
- X坐标public static double getNoise(double xin, double yin)
原文:Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D space
xin
- X坐标yin
- Y坐标public static double getNoise(double xin, double yin, double zin)
原文:Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D space
xin
- X坐标yin
- Y坐标zin
- Z坐标public 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
x
- X坐标y
- Y坐标z
- Z坐标w
- W坐标public double noise(double xin, double yin, double zin)
NoiseGenerator
原文:Computes and returns the 3D noise for the given coordinates in 3D space
noise
在类中 PerlinNoiseGenerator
xin
- X坐标yin
- Y坐标zin
- Z坐标public double noise(double xin, double yin)
NoiseGenerator
原文:Computes and returns the 2D noise for the given coordinates in 2D space
noise
在类中 NoiseGenerator
xin
- X坐标yin
- Y坐标public double noise(double x, double y, double z, double w)
原文:Computes and returns the 4D simplex noise for the given coordinates in 4D space
x
- X坐标y
- Y坐标z
- Z坐标w
- W坐标public static SimplexNoiseGenerator getInstance()
原文:Gets the singleton unseeded instance of this generator