Esempio n. 1
0
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            return(this.distorter.Noise(
                       sourceNoise, x + this.xShift, y + this.yShift, z + this.zShift, w + this.wShift));
        }
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            return(this.distorter.Noise(
                       sourceNoise, x * this.xFrequency, y * this.yFrequency, z * this.zFrequency, w * this.wFrequency));
        }
Esempio n. 3
0
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            return(this.distorter.Noise(sourceNoise, x, y, z, w).ConvertRange(
                       this.sourceNoiseStart, this.sourceNoiseEnd, this.resultNoiseStart, this.resultNoiseEnd));
        }
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            double result = 0;

            foreach (var distorter in this.distorters)
            {
                result += distorter.Noise(sourceNoise, x, y, z, w);
            }

            return(result);
        }
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            double result = this.distorter.Noise(sourceNoise, x, y, z, w);

            int weight = 2;

            for (int octave = 2; octave <= this.numberOfOctaves; octave++)
            {
                result += this.distorter.Noise(sourceNoise, x * weight, y * weight, z * weight, w * weight) / weight;
                weight *= 2;
            }

            return(result);
        }
Esempio n. 6
0
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            return(this.distorter.Noise(sourceNoise, x, y, z, w) * this.amplitude);
        }
Esempio n. 7
0
 /// <inheritdoc />
 public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
 {
     INoiseDistorter4DContracts.Noise(sourceNoise);
     return(sourceNoise.Noise(x, y, z, w));
 }
Esempio n. 8
0
        /// <inheritdoc />
        public double Noise(INoise4D sourceNoise, double x, double y, double z, double w)
        {
            INoiseDistorter4DContracts.Noise(sourceNoise);

            return(this.distorter.Noise(sourceNoise, x, y, z, w).Clamp(this.min, this.max));
        }