Esempio n. 1
0
        private double GetBasis(double x, double y, uint seed)
        {
            //call appr. noise method
            switch (Type)
            {
            case BasisTypes.VALUE: return(NoiseGen.value_noise2D(x, y, seed, Interp));

            case BasisTypes.GRADIENT: return(NoiseGen.gradient_noise2D(x, y, seed, Interp));

            case BasisTypes.GRADVAL: return(NoiseGen.gradval_noise2D(x, y, seed, Interp));

            case BasisTypes.WHITE: return(NoiseGen.white_noise2D(x, y, seed, Interp));

            case BasisTypes.SIMPLEX: return(NoiseGen.simplex_noise2D(x, y, seed, Interp));

            default: return(NoiseGen.gradient_noise2D(x, y, seed, Interp));
            }
        }
Esempio n. 2
0
        private double GetBasis(double x, double y, uint seed)
        {
            switch (_type)
            {
            case BasisTypes.VALUE:
                return(NoiseGen.value_noise2D(x, y, seed, _interp));

            case BasisTypes.GRADIENT:
                return(NoiseGen.gradient_noise2D(x, y, seed, _interp));

            case BasisTypes.GRADVAL:
                return(NoiseGen.gradval_noise2D(x, y, seed, _interp));

            case BasisTypes.WHITE:
                return(NoiseGen.white_noise2D(x, y, seed, _interp));

            case BasisTypes.SIMPLEX:
                return(0);

            default:
                return(NoiseGen.gradient_noise2D(x, y, seed, _interp));
            }
        }