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
Fields
amplitudes
public double[] amplitudes
Field Value
- double[]
frequencies
public double[] frequencies
Field Value
- double[]
octaves
public SimplexNoiseOctave[] octaves
Field Value
Methods
AbsNoise(double, double, double)
public virtual double AbsNoise(double x, double y, double z)
Parameters
Returns
Clone()
public SimplexNoise Clone()
Returns
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
Returns
Noise(double, double)
public virtual double Noise(double x, double y)
Parameters
Returns
Noise(double, double, double)
public virtual double Noise(double x, double y, double z)
Parameters
Returns
Noise(double, double, double[])
public double Noise(double x, double y, double[] thresholds)
Parameters
Returns
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
SimplexNoiseoriginalWarpY
SimplexNoisex
doubley
doubledistX
doubledistY
double
NoiseWithThreshold(double, double, double)
public double NoiseWithThreshold(double x, double y, double threshold)