public abstract class OctaveGenerator extends Object
Modifier and Type | Field and Description |
---|---|
protected NoiseGenerator[] |
octaves |
protected double |
xScale |
protected double |
yScale |
protected double |
zScale |
Modifier | Constructor and Description |
---|---|
protected |
OctaveGenerator(NoiseGenerator[] octaves) |
Modifier and Type | Method and Description |
---|---|
NoiseGenerator[] |
getOctaves()
Gets a clone of the individual octaves used within this generator
|
double |
getXScale()
Gets the scale used for each X-coordinates passed
|
double |
getYScale()
Gets the scale used for each Y-coordinates passed
|
double |
getZScale()
Gets the scale used for each Z-coordinates passed
|
double |
noise(double x,
double frequency,
double amplitude)
Generates noise for the 1D coordinates using the specified number of
octaves and parameters
|
double |
noise(double x,
double frequency,
double amplitude,
boolean normalized)
Generates noise for the 1D coordinates using the specified number of
octaves and parameters
|
double |
noise(double x,
double y,
double frequency,
double amplitude)
Generates noise for the 2D coordinates using the specified number of
octaves and parameters
|
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
|
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
|
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
|
void |
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 passed
|
void |
setYScale(double scale)
Sets the scale used for each Y-coordinates passed
|
void |
setZScale(double scale)
Sets the scale used for each Z-coordinates passed
|
protected final NoiseGenerator[] octaves
protected double xScale
protected double yScale
protected double zScale
protected OctaveGenerator(NoiseGenerator[] octaves)
public void setScale(double scale)
This is the equivalent to setting each coordinate to the specified value.
scale
- New value to scale each coordinate bypublic double getXScale()
public void setXScale(double scale)
scale
- New X scalepublic double getYScale()
public void setYScale(double scale)
scale
- New Y scalepublic double getZScale()
public void setZScale(double scale)
scale
- New Z scalepublic NoiseGenerator[] getOctaves()
public double noise(double x, double frequency, double amplitude)
x
- X-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavepublic double noise(double x, double frequency, double amplitude, boolean normalized)
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]public double noise(double x, double y, double frequency, double amplitude)
x
- X-coordinatey
- Y-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavepublic double noise(double x, double y, double frequency, double amplitude, boolean normalized)
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]public double noise(double x, double y, double z, double frequency, double amplitude)
x
- X-coordinatey
- Y-coordinatez
- Z-coordinatefrequency
- How much to alter the frequency by each octaveamplitude
- How much to alter the amplitude by each octavepublic double noise(double x, double y, double z, double frequency, double amplitude, boolean normalized)
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]Copyright © 2017. All rights reserved.