Пример #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));
        }
Пример #2
0
 public static SampleResult Max(SampleResult first, SampleResult second)
 {
     if (first.Distance > second.Distance)
     {
         return(first);
     }
     else
     {
         return(second);
     }
 }
Пример #3
0
 public override SampleResult Sample(Vec3 pos)
 {
     return(SampleResult.Max(First.Sample(pos), Second.Sample(pos)));
 }