示例#1
0
        public override bool Hit(Ray ray, float t_min, float t_max, ref HitRecord rec)
        {
            var temp_record  = new HitRecord();
            var hit_anything = false;
            var closest      = t_max;

            foreach (var h in list)
            {
                if (!h.Hit(ray, t_min, closest, ref temp_record))
                {
                    continue;
                }
                hit_anything = true;
                closest      = temp_record.t;
                rec          = temp_record;
            }
            return(hit_anything);
        }
示例#2
0
 public abstract bool scatter(Ray rayIn, HitRecord record, ref Color32 attenuation, ref Ray scattered);
示例#3
0
 public abstract bool Hit(Ray ray, float t_min, float t_max, ref HitRecord rec);