示例#1
0
        public HitData ShootRay(Ray3 ray)
        {
            HitData h = new HitData(ray);

            foreach (TracerObject obj in objects)
            {
                h.TryBetterHit(obj);
            }


            if (h.HasHit)
            {
                h.Position = ray.Eval(h.HitT);
                h.HitObject.ComputeHitData(h);
            }

            return(h);
        }