상속: Interpolator
예제 #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;
        }