diff options
| author | Sakarias Johansson <sakarias.johansson@goodbyekansas.com> | 2023-01-10 17:54:39 +0100 |
|---|---|---|
| committer | Sakarias Johansson <sakarias.johansson@goodbyekansas.com> | 2023-01-11 19:36:38 +0100 |
| commit | bbecf67545c2bd6822b0680673aa850c5ddef9f3 (patch) | |
| tree | 741b2fc03797a8fedcfe67e34687b4443fcf41f7 /racer-tracer/src/geometry | |
| parent | 899f81eed6c221dce22333ad03704b12d7634a54 (diff) | |
| download | racer-tracer-bbecf67545c2bd6822b0680673aa850c5ddef9f3.tar.gz racer-tracer-bbecf67545c2bd6822b0680673aa850c5ddef9f3.tar.xz racer-tracer-bbecf67545c2bd6822b0680673aa850c5ddef9f3.zip | |
🔨 Refactors & Use rayon
- All data shared between threads are now Arcs since the data is
immutable.
- Remove tokio
- Rustified main
Diffstat (limited to 'racer-tracer/src/geometry')
| -rw-r--r-- | racer-tracer/src/geometry/sphere.rs | 14 |
1 files changed, 0 insertions, 14 deletions
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<HitRecord> { 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<dyn Hittable> { - Box::new(self.clone()) - } } |
