Пример #1
0
        public override void Generate()
        {
            Interpolator i = null;

            switch (this.InterpolationMethod)
            {
            case Noise.InterpolationMethod.None:
            {
                i = new ClosestInterpolator();
                break;
            }

            case Noise.InterpolationMethod.Linear:
            {
                i = new LinearInterpolator();
                break;
            }

            case Noise.InterpolationMethod.Cubic:
            {
                throw new NotImplementedException();
            }

            case Noise.InterpolationMethod.Cosine:
            {
                throw new NotImplementedException();
            }
            }

            noise          = new PerlinNoise(octaves, persistence, i, this.Length, 1, 1, 1);    // Use 1 for the unused dimension sizes.
            this.Generated = true;
        }
Пример #2
0
        public override void Generate()
        {
            Interpolator i = null;

            switch (this.InterpolationMethod)
            {
                case Noise.InterpolationMethod.None:
                    {
                        i = new ClosestInterpolator();
                        break;
                    }
                case Noise.InterpolationMethod.Linear:
                    {
                        i = new LinearInterpolator();
                        break;
                    }
                case Noise.InterpolationMethod.Cubic:
                    {
                        throw new NotImplementedException();
                    }
                case Noise.InterpolationMethod.Cosine:
                    {
                        throw new NotImplementedException();
                    }
            }

            noise = new PerlinNoise(octaves, persistence, i, this.Length, 1, 1, 1); // Use 1 for the unused dimension sizes.
            this.Generated = true;
        }