Exemple #1
0
        public double Get(double x)
        {
            double vLow = _lowSource.Get(x);
            double vHigh = _highSource.Get(x);
            double blend = _controler.Get(x);

            return MathHelper.FullLerp(vLow, vHigh, _controlerRange.Min, _controlerRange.Max, blend);
        }
Exemple #2
0
        public double Get(double x)
        {
            double value = _source.Get(x);
            double gain  = _gain.Get(x);

            if (gain < 0.5)
            {
                return(Math.Pow(2.0 * value, Math.Log(1.0 - gain) / Math.Log(0.5)) / 2.0);
            }
            else
            {
                return(1.0 - Math.Pow(2.0 - 2.0 * value, Math.Log(1.0 - gain) / Math.Log(0.5)) / 2.0);
            }
        }
Exemple #3
0
        public double Get(double x)
        {
            double control   = _control.Get(x);
            double falloff   = _falloff.Get(x);
            double threshold = _threshold.Get(x);

            if (falloff > 0.0)
            {
                if (control < (threshold - falloff))
                {
                    // Lies outside of falloff area below threshold, return first source
                    return(_lowSource.Get(x));
                }
                else if (control > (threshold + falloff))
                {
                    // Lise outside of falloff area above threshold, return second source
                    return(_highSource.Get(x));
                }
                else
                {
                    // Lies within falloff area.
                    double lower = threshold - falloff;
                    double upper = threshold + falloff;
                    double blend = MathHelper.SCurve5((control - lower) / (upper - lower));
                    return(MathHelper.Lerp(_lowSource.Get(x), _highSource.Get(x), blend));
                }
            }
            else
            {
                if (control < threshold)
                {
                    return(_lowSource.Get(x));
                }
                else
                {
                    return(_highSource.Get(x));
                }
            }
        }
Exemple #4
0
 public double Get(double x)
 {
     return(_source.Get(x) * _scale.Get(x) + _offset.Get(x));
 }
Exemple #5
0
        public double Get(double x)
        {
            double value = _source.Get(x);

            return(Math.Pow(value, Math.Log(_bias.Get(x)) / Math.Log(0.5)));
        }
Exemple #6
0
 public double Get(double x, double y, double z, double w)
 {
     return(_source.Get(x + _xOffset.Get(x, y, z, w), y + _yOffset.Get(x, y, z, w), z + _zOffset.Get(x, y, z, w), w + _wOffset.Get(x, y, z, w)));
 }
Exemple #7
0
 public double Get(double x, double y, double z)
 {
     return(_source.Get(x + _xOffset.Get(x, y, z), y + _yOffset.Get(x, y, z), z + _zOffset.Get(x, y, z)));
 }
Exemple #8
0
 public double Get(double x, double y)
 {
     return(_source.Get(x + _xOffset.Get(x, y), y + _yOffset.Get(x, y)));
 }
Exemple #9
0
 public double Get(double x)
 {
     return(_source.Get(x + _xOffset.Get(x)));
 }
Exemple #10
0
 public double Get(double x)
 {
     return(Math.Pow(_source.Get(x), _power.Get(x)));
 }
Exemple #11
0
 public double Get(double x)
 {
     return(MathHelper.FullLerp(_targetMin, _targetMax, _sourceMin, _sourceMax, _source.Get(x)));
 }
Exemple #12
0
 public double Get(double x, double y, double z, double w)
 {
     return(_source.Get(x * _xScale.Get(x, y, z, w), y * _yScale.Get(x, y, z, w), z * _zScale.Get(x, y, z, w), w * _wScale.Get(x, y, z, w)));
 }
Exemple #13
0
 public double Get(double x, double y, double z)
 {
     return(_source.Get(x * _xScale.Get(x, y, z), y * _yScale.Get(x, y, z), z * _zScale.Get(x, y, z)));
 }
Exemple #14
0
 public double Get(double x, double y)
 {
     return(_source.Get(x * _xScale.Get(x, y), y * _yScale.Get(x, y)));
 }
Exemple #15
0
 public double Get(double x)
 {
     return(_source.Get(x * _xScale.Get(x)));
 }