private static readonly int OCTAVE_COUNT = 10; // perhaps should be a variable // but that creates coordination issues public OpenSimplexNoise(long seed) { octaves = new SimplexOctave[OCTAVE_COUNT]; for (int i = 0; i < OCTAVE_COUNT; i++) { octaves[i] = new SimplexOctave(seed + i); } }
public NoiseInstance2(SimplexOctave noise, int valueIndex, int ddxIndex, int ddyIndex, int sph2xIndex, int sph2yIndex) { this.noise = noise; this.valueIndex = valueIndex; this.ddxIndex = ddxIndex; this.ddyIndex = ddyIndex; this.sph2xIndex = sph2xIndex; this.sph2yIndex = sph2yIndex; }
public SimplexGenerator(float frequency, float persistence, int octaveCount, float amplitude) { this._persistence = persistence; //Less awkward frequencies for user this._frequency = frequency / 100F; this._octaveCount = octaveCount; this._amplitude = amplitude; _octaves = new SimplexOctave[octaveCount]; for (int i = 0; i < octaveCount; i++) { _octaves[i] = new SimplexOctave(Rul.RandInt()); } _highestValue = SimplexNoiseAt(0, 0, true); }
public NoiseInstance2(SimplexOctave noise, int valueIndex) : this(noise, valueIndex, -1, -1, -1, -1) { }