pub mod glass;
pub mod matte;
pub mod metal;
use std::sync::Arc;
use crate::{
HitData,
Ray,
Vec3
};
pub trait Material: Sync + Send + 'static {
fn into_arc(self) -> Arc<dyn Material>
where
Self: Material + Sized + 'static {
Arc::new(self)
}
fn scatter(&self, ray_in: &Ray, hit_data: &HitData) -> (Vec3, Ray);
}