public final class NoiseSource
extends java.lang.Object
| Constructor and Description |
|---|
NoiseSource(NoiseColumnSampler noiseColumnSampler,
int noiseSizeX,
int noiseSizeY,
int noiseSizeZ)
Constructs a new noise source with which to sample terrain densities.
|
| Modifier and Type | Method and Description |
|---|---|
double |
sample()
Gets the interpolated density.
|
void |
sampleInitialNoise(int startNoiseX,
int startNoiseZ,
NoiseSettings noiseSettings,
java.util.List<NoiseSampler> noiseSamplers)
Samples the initial densities for an entire chunk, given starting noise coordinates.
|
void |
sampleNoiseCorners(int noiseX,
int noiseY,
int noiseZ)
Gets and stores the densities from the corners of the subchunk, given noise coordinates.
|
void |
sampleNoiseX(double deltaX)
Interpolates along the x-axis given a delta.
|
void |
sampleNoiseY(double deltaY)
Interpolates along the y-axis given a delta.
|
void |
sampleNoiseZ(double deltaZ)
Interpolates the final density along the z-axis given a delta
|
public NoiseSource(NoiseColumnSampler noiseColumnSampler, int noiseSizeX, int noiseSizeY, int noiseSizeZ)
noiseColumnSampler - Noise sampler for all densities in a column for a particular x/z noise coordinate.noiseSizeX - Number of subchunks in the x-axis of a chunk.noiseSizeY - Number of subchunks in world height.noiseSizeZ - Number of subchunks in the z-axis of a chunk.public final void sampleInitialNoise(int startNoiseX,
int startNoiseZ,
NoiseSettings noiseSettings,
java.util.List<NoiseSampler> noiseSamplers)
startNoiseX - x-coordinate in noise coordinates.startNoiseZ - z-coordinate in noise coordinates.noiseSettings - Noise settings, including slides.noiseSamplers - List of noise samplers.public final void sampleNoiseCorners(int noiseX,
int noiseY,
int noiseZ)
noiseX - x-coordinate in noise coordinates.noiseY - y-coordinate in noise coordinates.noiseZ - z-coordinate in noise coordinates.public final void sampleNoiseY(double deltaY)
deltaY - The current delta, based on current y-position within a subchunk.public final void sampleNoiseX(double deltaX)
deltaX - The current delta, based on current x-position within a subchunk.public final void sampleNoiseZ(double deltaZ)
deltaZ - The current delta, based on current z-position within a subchunk.public final double sample()