pub trait Hittable { // Required method fn hit(&self, r: &Ray, t_min: f64, t_max: f64) -> Option<HitRecord>; }
Trait for objects that can be intersected by a ray.
Returns Some(HitRecord) if the ray intersects in the interval [t_min, t_max], or None.
Some(HitRecord)
[t_min, t_max]
None