public override double Get(double x, double y, double z, double w)
        {
            double value     = Source.Get(x, y, z, w);
            double falloff   = Falloff.Get(x, y, z, w);
            double threshold = Threshold.Get(x, y, z, w);

            if (falloff > 0.0)
            {
                if (value < (threshold - falloff)) // Lies outside of falloff area below threshold, return first source
                {
                    return(Low.Get(x, y, z, w));
                }
                if (value > (threshold + falloff)) // Lies outside of falloff area above threshold, return second source
                {
                    return(High.Get(x, y, z, w));
                }

                // Lies within falloff area.
                double lower = threshold - falloff;
                double upper = threshold + falloff;
                double blend = Utilities.QuinticBlend((value - lower) / (upper - lower));
                return(Utilities.Lerp(blend, Low.Get(x, y, z, w), High.Get(x, y, z, w)));
            }

            return(value < threshold?Low.Get(x, y, z, w) : High.Get(x, y, z, w));
        }
        public override double Get(double x, double y, double z, double w, double u, double v)
        {
            double v1    = Low.Get(x, y, z, w, u, v);
            double v2    = High.Get(x, y, z, w, u, v);
            double blend = Source.Get(x, y, z, w, u, v);

            return(Utilities.Lerp(blend, v1, v2));
        }
        public override double Get(double x, double y)
        {
            double v1    = Low.Get(x, y);
            double v2    = High.Get(x, y);
            double blend = (Source.Get(x, y) + 1.0) * 0.5;

            return(Utilities.Lerp(blend, v1, v2));
        }
Esempio n. 4
0
 public override Double Get(Double x, Double y, Double z, Double w, Double u, Double v)
 {
     return(MathHelper.Clamp(Source.Get(x, y, z, w, u, v), Low.Get(x, y, z, w, u, v), High.Get(x, y, z, w, u, v)));
 }
Esempio n. 5
0
 public override Double Get(Double x, Double y, Double z)
 {
     return(MathHelper.Clamp(Source.Get(x, y, z), Low.Get(x, y, z), High.Get(x, y, z)));
 }
Esempio n. 6
0
 public override double Get(double x, double y, double z, double w, double u, double v) => Utilities.Clamp(Source.Get(x, y, z, w, u, v), Low.Get(x, y, z, w, u, v), High.Get(x, y, z, w, u, v));
Esempio n. 7
0
 public override double Get(double x, double y, double z, double w) => Utilities.Clamp(Source.Get(x, y, z, w), Low.Get(x, y, z, w), High.Get(x, y, z, w));
Esempio n. 8
0
 public override double Get(double x, double y) => Utilities.Clamp(Source.Get(x, y), Low.Get(x, y), High.Get(x, y));
Esempio n. 9
0
 public override Double Get(Double x, Double y, Double z, Double w)
 {
     return(MathUtilities.Clamp(Source.Get(x, y, z, w), Low.Get(x, y, z, w), High.Get(x, y, z, w)));
 }
Esempio n. 10
0
        public override Double Get(Double x, Double y, Double z, Double w)
        {
			return MathHelper.Clamp(Source.Get(x, y, z, w), Low.Get(x, y, z, w), High.Get(x, y, z, w));
        }
Esempio n. 11
0
        public override Double Get(Double x, Double y)
        {            
			return MathHelper.Clamp(Source.Get(x, y), Low.Get(x, y), High.Get(x, y));
        }
Esempio n. 12
0
 public override Double Get(Double x, Double y, Double z, Double w, Double u, Double v)
 {
     return(Utilities.Clamp(Source.Get(x, y, z, w, u, v), Low.Get(x, y, z, w, u, v), High.Get(x, y, z, w, u, v)));
 }
Esempio n. 13
0
 public override Double Get(Double x, Double y, Double z)
 {
     return(Utilities.Clamp(Source.Get(x, y, z), Low.Get(x, y, z), High.Get(x, y, z)));
 }