pub trait Hit: Send + Sync {
// Required methods
fn hit(&self, r: &Ray) -> HitRecord;
fn texture(&self) -> Texture;
fn inside(&self, pos: Vec3) -> bool;
}Expand description
Any object that is to be added to a scene needs to either implement this trait or be able to be decomposed into a vector of objects that do.