From bbecf67545c2bd6822b0680673aa850c5ddef9f3 Mon Sep 17 00:00:00 2001 From: Sakarias Johansson Date: Tue, 10 Jan 2023 17:54:39 +0100 Subject: =?UTF-8?q?=F0=9F=94=A8=20Refactors=20&=20Use=20rayon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - All data shared between threads are now Arcs since the data is immutable. - Remove tokio - Rustified main --- racer-tracer/src/geometry/sphere.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'racer-tracer/src/geometry') diff --git a/racer-tracer/src/geometry/sphere.rs b/racer-tracer/src/geometry/sphere.rs index 6a0ab9c..e974c44 100644 --- a/racer-tracer/src/geometry/sphere.rs +++ b/racer-tracer/src/geometry/sphere.rs @@ -20,16 +20,6 @@ impl Sphere { } } -impl Clone for Sphere { - fn clone(&self) -> Self { - Self { - pos: self.pos, - radius: self.radius, - material: self.material, - } - } -} - impl Hittable for Sphere { fn hit(&self, ray: &Ray, t_min: f64, t_max: f64) -> Option { let oc = ray.origin() - self.pos; @@ -61,8 +51,4 @@ impl Hittable for Sphere { hit_record.set_face_normal(ray, outward_normal); Some(hit_record) } - - fn clone_box(&self) -> Box { - Box::new(self.clone()) - } } -- cgit v1.2.3