Package org.bukkit.util.noise
Class PerlinNoiseGenerator
java.lang.Object
org.bukkit.util.noise.NoiseGenerator
org.bukkit.util.noise.PerlinNoiseGenerator
- Direct Known Subclasses:
- SimplexNoiseGenerator
Generates noise using the "classic" perlin generator
- See Also:
- 
Field SummaryFieldsFields inherited from class org.bukkit.util.noise.NoiseGeneratoroffsetX, offsetY, offsetZ, perm
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPerlinNoiseGenerator(long seed) Creates a seeded perlin noise generator for the given seedPerlinNoiseGenerator(Random rand) Creates a seeded perlin noise generator with the given RandomPerlinNoiseGenerator(World world) Creates a seeded perlin noise generator for the given world
- 
Method SummaryModifier and TypeMethodDescriptionstatic PerlinNoiseGeneratorGets the singleton unseeded instance of this generatorstatic doublegetNoise(double x) Computes and returns the 1D unseeded perlin noise for the given coordinates in 1D spacestatic doublegetNoise(double x, double y) Computes and returns the 2D unseeded perlin noise for the given coordinates in 2D spacestatic doublegetNoise(double x, double y, double z) Computes and returns the 3D unseeded perlin noise for the given coordinates in 3D spacestatic doublegetNoise(double x, double y, double z, int octaves, double frequency, double amplitude) Generates noise for the 3D coordinates using the specified number of octaves and parametersstatic doublegetNoise(double x, double y, int octaves, double frequency, double amplitude) Generates noise for the 2D coordinates using the specified number of octaves and parametersstatic doublegetNoise(double x, int octaves, double frequency, double amplitude) Generates noise for the 1D coordinates using the specified number of octaves and parametersdoublenoise(double x, double y, double z) Computes and returns the 3D noise for the given coordinates in 3D space
- 
Field Details- 
grad3protected static final int[][] grad3
 
- 
- 
Constructor Details- 
PerlinNoiseGeneratorprotected PerlinNoiseGenerator()
- 
PerlinNoiseGeneratorCreates a seeded perlin noise generator for the given world- Parameters:
- world- World to construct this generator for
 
- 
PerlinNoiseGeneratorpublic PerlinNoiseGenerator(long seed) Creates a seeded perlin noise generator for the given seed- Parameters:
- seed- Seed to construct this generator for
 
- 
PerlinNoiseGeneratorCreates a seeded perlin noise generator with the given Random- Parameters:
- rand- Random to construct with
 
 
- 
- 
Method Details- 
getNoisepublic static double getNoise(double x) Computes and returns the 1D unseeded perlin noise for the given coordinates in 1D space- Parameters:
- x- X coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic static double getNoise(double x, double y) Computes and returns the 2D unseeded perlin noise for the given coordinates in 2D space- Parameters:
- x- X coordinate
- y- Y coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic static double getNoise(double x, double y, double z) Computes and returns the 3D unseeded perlin noise for the given coordinates in 3D space- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getInstanceGets the singleton unseeded instance of this generator- Returns:
- Singleton
 
- 
noisepublic double noise(double x, double y, double z) Description copied from class:NoiseGeneratorComputes and returns the 3D noise for the given coordinates in 3D space- Specified by:
- noisein class- NoiseGenerator
- Parameters:
- x- X coordinate
- y- Y coordinate
- z- Z coordinate
- Returns:
- Noise at given location, from range -1 to 1
 
- 
getNoisepublic static double getNoise(double x, int octaves, double frequency, double amplitude) Generates noise for the 1D coordinates using the specified number of octaves and parameters- Parameters:
- x- X-coordinate
- octaves- Number of octaves to use
- frequency- How much to alter the frequency by each octave
- amplitude- How much to alter the amplitude by each octave
- Returns:
- Resulting noise
 
- 
getNoisepublic static double getNoise(double x, double y, int octaves, double frequency, double amplitude) Generates noise for the 2D coordinates using the specified number of octaves and parameters- Parameters:
- x- X-coordinate
- y- Y-coordinate
- octaves- Number of octaves to use
- frequency- How much to alter the frequency by each octave
- amplitude- How much to alter the amplitude by each octave
- Returns:
- Resulting noise
 
- 
getNoisepublic static double getNoise(double x, double y, double z, int octaves, double frequency, double amplitude) Generates noise for the 3D coordinates using the specified number of octaves and parameters- Parameters:
- x- X-coordinate
- y- Y-coordinate
- z- Z-coordinate
- octaves- Number of octaves to use
- frequency- How much to alter the frequency by each octave
- amplitude- How much to alter the amplitude by each octave
- Returns:
- Resulting noise
 
 
-