Package org.bukkit.util.noise
Class OctaveGenerator
java.lang.Object
org.bukkit.util.noise.OctaveGenerator
- Direct Known Subclasses:
PerlinOctaveGenerator
,SimplexOctaveGenerator
Creates noise using unbiased octaves
-
Field Summary
Modifier and TypeFieldDescriptionprotected final NoiseGenerator[]
protected double
protected double
protected double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a clone of the individual octaves used within this generatordouble
Gets the scale used for each X-coordinates passeddouble
Gets the scale used for each Y-coordinates passeddouble
Gets the scale used for each Z-coordinates passeddouble
noise
(double x, double frequency, double amplitude) Generates noise for the 1D coordinates using the specified number of octaves and parametersdouble
noise
(double x, double frequency, double amplitude, boolean normalized) Generates noise for the 1D coordinates using the specified number of octaves and parametersdouble
noise
(double x, double y, double frequency, double amplitude) Generates noise for the 2D coordinates using the specified number of octaves and parametersdouble
noise
(double x, double y, double frequency, double amplitude, boolean normalized) Generates noise for the 2D coordinates using the specified number of octaves and parametersdouble
noise
(double x, double y, double z, double frequency, double amplitude) Generates noise for the 3D coordinates using the specified number of octaves and parametersdouble
noise
(double x, double y, double z, double frequency, double amplitude, boolean normalized) Generates noise for the 3D coordinates using the specified number of octaves and parametersvoid
setScale
(double scale) Sets the scale used for all coordinates passed to this generator.void
setXScale
(double scale) Sets the scale used for each X-coordinates passedvoid
setYScale
(double scale) Sets the scale used for each Y-coordinates passedvoid
setZScale
(double scale) Sets the scale used for each Z-coordinates passed
-
Field Details
-
octaves
-
xScale
protected double xScale -
yScale
protected double yScale -
zScale
protected double zScale
-
-
Constructor Details
-
OctaveGenerator
-
-
Method Details
-
setScale
public void setScale(double scale) Sets the scale used for all coordinates passed to this generator.This is the equivalent to setting each coordinate to the specified value.
- Parameters:
scale
- New value to scale each coordinate by
-
getXScale
public double getXScale()Gets the scale used for each X-coordinates passed- Returns:
- X scale
-
setXScale
public void setXScale(double scale) Sets the scale used for each X-coordinates passed- Parameters:
scale
- New X scale
-
getYScale
public double getYScale()Gets the scale used for each Y-coordinates passed- Returns:
- Y scale
-
setYScale
public void setYScale(double scale) Sets the scale used for each Y-coordinates passed- Parameters:
scale
- New Y scale
-
getZScale
public double getZScale()Gets the scale used for each Z-coordinates passed- Returns:
- Z scale
-
setZScale
public void setZScale(double scale) Sets the scale used for each Z-coordinates passed- Parameters:
scale
- New Z scale
-
getOctaves
Gets a clone of the individual octaves used within this generator- Returns:
- Clone of the individual octaves
-
noise
public double noise(double x, double frequency, double amplitude) Generates noise for the 1D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octave- Returns:
- Resulting noise
-
noise
public double noise(double x, double frequency, double amplitude, boolean normalized) Generates noise for the 1D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavenormalized
- If true, normalize the value to [-1, 1]- Returns:
- Resulting noise
-
noise
public double noise(double x, double y, double frequency, double amplitude) Generates noise for the 2D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatey
- Y-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octave- Returns:
- Resulting noise
-
noise
public double noise(double x, double y, double frequency, double amplitude, boolean normalized) Generates noise for the 2D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatey
- Y-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavenormalized
- If true, normalize the value to [-1, 1]- Returns:
- Resulting noise
-
noise
public double noise(double x, double y, double z, double frequency, double amplitude) Generates noise for the 3D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatey
- Y-coordinatez
- Z-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octave- Returns:
- Resulting noise
-
noise
public double noise(double x, double y, double z, double frequency, double amplitude, boolean normalized) Generates noise for the 3D coordinates using the specified number of octaves and parameters- Parameters:
x
- X-coordinatey
- Y-coordinatez
- Z-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavenormalized
- If true, normalize the value to [-1, 1]- Returns:
- Resulting noise
-