ft: 5,6.1: sphere class + normals
This commit is contained in:
1 parent
67c1eb861d
commit
ebf39d014b
8 files changed
+126
-12
No files matched your search
@@ -0,0 +1,11 @@
|
||||
use crate::objects::hit::Hit;
|
||||
use crate::Ray;
|
||||
use crate::Vec3;
|
||||
|
||||
pub trait Hittable {
|
||||
fn hit(&self, r: &Ray) -> Option<Hit>;
|
||||
}
|
||||
|
||||
pub trait Normal {
|
||||
fn normal_at(&self, p: &Vec3) -> Vec3;
|
||||
}
|
||||