Exemple #1
0
        public override SampleResult Sample(Vec3 pos)
        {
            var secondResult = Second.Sample(pos);

            secondResult.Distance = -secondResult.Distance;
            secondResult.Normal   = -secondResult.Normal;
            return(SampleResult.Max(First.Sample(pos), secondResult));
        }
 public static SampleResult Max(SampleResult first, SampleResult second)
 {
     if (first.Distance > second.Distance)
     {
         return(first);
     }
     else
     {
         return(second);
     }
 }
 public override SampleResult Sample(Vec3 pos)
 {
     return(SampleResult.Max(First.Sample(pos), Second.Sample(pos)));
 }