예제 #1
0
        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);
            }
        }
예제 #2
0
 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;
 }
예제 #3
0
 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);
 }
예제 #4
0
 public NoiseInstance2(SimplexOctave noise, int valueIndex) : this(noise, valueIndex, -1, -1, -1, -1)
 {
 }