Contents
Class SimplexNoiseField
java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.noise.NoiseField
com.hypixel.hytale.builtin.hytalegenerator.noise.SimplexNoiseField
Generates Simplex noise with multiple octaves up to 4 dimensions. The result
is normalized from -1 to 1.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSimplexNoiseField(long seed, double octaveAmplitudeMultiplier, double octaveFrequencyMultiplier, int numberOfOctaves) Initializes an instance with a seed, an octave amplitude multiplier, an octave frequency multiplier and a set number of octaves to initialize. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimplexNoiseField.Builderbuilder()longgetSeed()Returns the seed used by this generator.doublevalueAt(double x) Calculates the 1D normalized value at the provided coordinates.doublevalueAt(double x, double y) Calculates the 2D normalized value at the provided coordinates.doublevalueAt(double x, double y, double z) Calculates the 3D normalized value at the provided coordinates.doublevalueAt(double x, double y, double z, double w) Calculates the 4D normalized value at the provided coordinates.Methods inherited from class NoiseField
setScale, setScale
-
Constructor Details
-
SimplexNoiseField
public SimplexNoiseField(long seed, double octaveAmplitudeMultiplier, double octaveFrequencyMultiplier, int numberOfOctaves) Initializes an instance with a seed, an octave amplitude multiplier, an octave frequency multiplier and a set number of octaves to initialize. The octave amplitude and frequency multipliers are applied to the amplitude of each consecutive octave based on the previous octave's value. The more octaves means more noise and randomness.A frequency of: 1 all octaves have frequency 1 0..1 consecutive octaves have smaller frequency values hence larger noise 1... consecutive octaves have larger frequency values hence smaller noise
An amplitude of: 1 all octaves have amplitude 1 0..1 consecutive octaves have less impact on the value 1... consecutive octaves have more impact on the value
- Parameters:
seed- determines the uniqueness of the valuesoctaveAmplitudeMultiplier- amplitude multiplieroctaveFrequencyMultiplier- frequency multipliernumberOfOctaves- that generate noise value
-
-
Method Details
-
builder
-
valueAt
public double valueAt(double x, double y, double z, double w) Calculates the 4D normalized value at the provided coordinates.- Specified by:
valueAtin classNoiseField
-
valueAt
public double valueAt(double x, double y, double z) Calculates the 3D normalized value at the provided coordinates.- Specified by:
valueAtin classNoiseField
-
valueAt
public double valueAt(double x, double y) Calculates the 2D normalized value at the provided coordinates.- Specified by:
valueAtin classNoiseField
-
valueAt
public double valueAt(double x) Calculates the 1D normalized value at the provided coordinates.- Specified by:
valueAtin classNoiseField
-
getSeed
public long getSeed()Returns the seed used by this generator.
-