Package org.bukkit.util.noise
Class SimplexNoiseGenerator
java.lang.Object
org.bukkit.util.noise.NoiseGenerator
org.bukkit.util.noise.PerlinNoiseGenerator
org.bukkit.util.noise.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 SummaryFieldsModifier and TypeFieldDescriptionprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final doubleprotected static final int[][]protected doubleprotected static final int[][]protected static final doubleprotected static final doubleFields inherited from class org.bukkit.util.noise.PerlinNoiseGeneratorgrad3Fields inherited from class org.bukkit.util.noise.NoiseGeneratoroffsetX, offsetY, offsetZ, perm
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSimplexNoiseGenerator(long seed) Creates a seeded simplex noise generator for the given seedCreates a seeded simplex noise generator with the given RandomSimplexNoiseGenerator(@NotNull World world) Creates a seeded simplex noise generator for the given world
- 
Method SummaryModifier and TypeMethodDescriptionprotected static doubledot(@org.jetbrains.annotations.NotNull int[] g, double x, double y) protected static doubledot(@org.jetbrains.annotations.NotNull int[] g, double x, double y, double z) protected static doubledot(@org.jetbrains.annotations.NotNull int[] g, double x, double y, double z, double w) static @NotNull SimplexNoiseGeneratorGets the singleton unseeded instance of this generatorstatic doublegetNoise(double xin) Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D spacestatic doublegetNoise(double xin, double yin) Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D spacestatic doublegetNoise(double xin, double yin, double zin) Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D spacestatic doublegetNoise(double x, double y, double z, double w) Computes and returns the 4D simplex noise for the given coordinates in 4D spacedoublenoise(double xin, double yin) Computes and returns the 2D noise for the given coordinates in 2D spacedoublenoise(double xin, double yin, double zin) Computes and returns the 3D noise for the given coordinates in 3D spacedoublenoise(double x, double y, double z, double w) Computes and returns the 4D simplex noise for the given coordinates in 4D spaceMethods inherited from class org.bukkit.util.noise.PerlinNoiseGeneratorgetNoise, getNoise, getNoise
- 
Field Details- 
SQRT_3protected static final double SQRT_3
- 
SQRT_5protected static final double SQRT_5
- 
F2protected static final double F2
- 
G2protected static final double G2
- 
G22protected static final double G22
- 
F3protected static final double F3- See Also:
 
- 
G3protected static final double G3- See Also:
 
- 
F4protected static final double F4
- 
G4protected static final double G4
- 
G42protected static final double G42
- 
G43protected static final double G43
- 
G44protected static final double G44
- 
grad4protected static final int[][] grad4
- 
simplexprotected static final int[][] simplex
- 
offsetWprotected double offsetW
 
- 
- 
Constructor Details- 
SimplexNoiseGeneratorprotected SimplexNoiseGenerator()
- 
SimplexNoiseGeneratorCreates a seeded simplex noise generator for the given world- Parameters:
- world- World to construct this generator for
 
- 
SimplexNoiseGeneratorpublic SimplexNoiseGenerator(long seed) Creates a seeded simplex noise generator for the given seed- Parameters:
- seed- Seed to construct this generator for
 
- 
SimplexNoiseGeneratorCreates a seeded simplex noise generator with the given Random- Parameters:
- rand- Random to construct with
 
 
- 
- 
Method Details- 
dotprotected static double dot(@NotNull @org.jetbrains.annotations.NotNull int[] g, double x, double y) 
- 
dotprotected static double dot(@NotNull @org.jetbrains.annotations.NotNull int[] g, double x, double y, double z) 
- 
dotprotected static double dot(@NotNull @org.jetbrains.annotations.NotNull int[] g, double x, double y, double z, double w) 
- 
getNoisepublic static double getNoise(double xin) Computes and returns the 1D unseeded simplex noise for the given coordinates in 1D space- Parameters:
- xin- X coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic static double getNoise(double xin, double yin) Computes and returns the 2D unseeded simplex noise for the given coordinates in 2D space- Parameters:
- xin- X coordinate
- yin- Y coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic static double getNoise(double xin, double yin, double zin) Computes and returns the 3D unseeded simplex noise for the given coordinates in 3D space- Parameters:
- xin- X coordinate
- yin- Y coordinate
- zin- Z coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic 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- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
- w- W coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
noisepublic double noise(double xin, double yin, double zin) Description copied from class:NoiseGeneratorComputes and returns the 3D noise for the given coordinates in 3D space- Overrides:
- noisein class- PerlinNoiseGenerator
- Parameters:
- xin- X coordinate
- yin- Y coordinate
- zin- Z coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
noisepublic double noise(double xin, double yin) Description copied from class:NoiseGeneratorComputes and returns the 2D noise for the given coordinates in 2D space- Overrides:
- noisein class- NoiseGenerator
- Parameters:
- xin- X coordinate
- yin- Y coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
noisepublic double noise(double x, double y, double z, double w) Computes and returns the 4D simplex noise for the given coordinates in 4D space- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
- w- W coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getInstanceGets the singleton unseeded instance of this generator- Returns:
- Singleton
 
 
-