Table of Contents

Class SimplexNoise

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

OpenSimplex noise of supplied amplitude and frequency.

public class SimplexNoise
Inheritance
SimplexNoise
Inherited Members
Extension Methods

Constructors

SimplexNoise(double[], double[], long)

public SimplexNoise(double[] amplitudes, double[] frequencies, long seed)

Parameters

amplitudes double[]
frequencies double[]
seed long

Fields

amplitudes

public double[] amplitudes

Field Value

double[]

frequencies

public double[] frequencies

Field Value

double[]

octaves

public SimplexNoiseOctave[] octaves

Field Value

SimplexNoiseOctave[]

Methods

AbsNoise(double, double, double)

public virtual double AbsNoise(double x, double y, double z)

Parameters

x double
y double
z double

Returns

double

Clone()

public SimplexNoise Clone()

Returns

SimplexNoise

FromDefaultOctaves(int, double, double, long)

Generates the octaves and frequencies using following formulas freq[i] = baseFrequency * 2^i amp[i] = persistence^i

public static SimplexNoise FromDefaultOctaves(int quantityOctaves, double baseFrequency, double persistence, long seed)

Parameters

quantityOctaves int
baseFrequency double
persistence double
seed long

Returns

SimplexNoise

Noise(double, double)

public virtual double Noise(double x, double y)

Parameters

x double
y double

Returns

double

Noise(double, double, double)

public virtual double Noise(double x, double y, double z)

Parameters

x double
y double
z double

Returns

double

Noise(double, double, double[])

public double Noise(double x, double y, double[] thresholds)

Parameters

x double
y double
thresholds double[]

Returns

double

NoiseFairWarpVector(SimplexNoise, SimplexNoise, double, double, out double, out double)

public static void NoiseFairWarpVector(SimplexNoise originalWarpX, SimplexNoise originalWarpY, double x, double y, out double distX, out double distY)

Parameters

originalWarpX SimplexNoise
originalWarpY SimplexNoise
x double
y double
distX double
distY double

NoiseWithThreshold(double, double, double)

public double NoiseWithThreshold(double x, double y, double threshold)

Parameters

x double
y double
threshold double

Returns

double