summaryrefslogtreecommitdiff
path: root/racer-tracer/src/geometry/sphere.rs
diff options
context:
space:
mode:
authorSakarias Johansson <sakarias.johansson@goodbyekansas.com>2023-01-12 22:07:57 +0100
committerSakarias Johansson <sakarias.johansson@goodbyekansas.com>2023-01-12 22:07:57 +0100
commit9d44f7ab04e6f6979e0eebc24f8fb439a23a3865 (patch)
tree5194f6bd792c8ccf7a164582a1ebb5dc51e3a98c /racer-tracer/src/geometry/sphere.rs
parenta6302805d19273c95278c8d792ffbd9b2633fe20 (diff)
downloadracer-tracer-9d44f7ab04e6f6979e0eebc24f8fb439a23a3865.tar.gz
racer-tracer-9d44f7ab04e6f6979e0eebc24f8fb439a23a3865.tar.xz
racer-tracer-9d44f7ab04e6f6979e0eebc24f8fb439a23a3865.zip
🧹 Minor cleanup
- Made the traits into supertraits so we don't have to mention Send and Sync everywhere. - Add methods for Vec3 that modifies the existing Vector. Can be used to make less copies.
Diffstat (limited to 'racer-tracer/src/geometry/sphere.rs')
-rw-r--r--racer-tracer/src/geometry/sphere.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/racer-tracer/src/geometry/sphere.rs b/racer-tracer/src/geometry/sphere.rs
index 256abec..81b621c 100644
--- a/racer-tracer/src/geometry/sphere.rs
+++ b/racer-tracer/src/geometry/sphere.rs
@@ -9,11 +9,11 @@ use crate::vec3::Vec3;
pub struct Sphere {
pos: Vec3,
radius: f64,
- material: Arc<Box<dyn Material + Sync + Send>>, // Just a color for now.
+ material: Arc<Box<dyn Material>>,
}
impl Sphere {
- pub fn new(pos: Vec3, radius: f64, material: Arc<Box<dyn Material + Sync + Send>>) -> Self {
+ pub fn new(pos: Vec3, radius: f64, material: Arc<Box<dyn Material>>) -> Self {
Self {
pos,
radius,