Hittable

Trait Hittable 

Source
pub trait Hittable {
    // Required method
    fn intersection(
        &self,
        rng: &mut Box<dyn RngCore>,
        ray: &Ray,
    ) -> Option<HitRecord>;
}
Expand description

Represents an object that a ray can hit.

Required Methods§

Source

fn intersection( &self, rng: &mut Box<dyn RngCore>, ray: &Ray, ) -> Option<HitRecord>

Computes the hit parameters for an input ray. Returns None if the ray does not hit this object.

Implementors§