aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-07-31 18:27:56 +0200
committerJulian T <julian@jtle.dk>2021-07-31 18:27:56 +0200
commitae460c3f34838e3baf0ffafe4ccbcf1fbfe03095 (patch)
treea2ff1092f5deb2d28f5196d69ba511487f0a4953 /src/main.rs
parentcee9bcf4a2c8ffbfe6487f7886b2247eaba1c92c (diff)
Remove dynamic boxes from object and list implementation
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index dc9ea43..5f336c1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,10 +28,10 @@ fn main() {
let mut scn = Scene::new();
scn.add_objects(vec![
- Object::new(metal, Box::new(Sphere::new(0.2, Vector3f::new_xyz(0.0, 0.0, -1.0)))),
- Object::new(blue, Box::new(Sphere::new(0.5, Vector3f::new_xyz(1.0, 0.0, -1.0)))),
- Object::new(brown, Box::new(Sphere::new(100.0, Vector3f::new_xyz(0.0, -100.5, -1.0)))),
- Object::new(sun, Box::new(Sphere::new(0.4, Vector3f::new_xyz(-1.0, 0.7, 0.0)))),
+ Object::new(metal, Sphere::new(0.2, Vector3f::new_xyz(0.0, 0.0, -1.0))),
+ Object::new(blue, Sphere::new(0.5, Vector3f::new_xyz(1.0, 0.0, -1.0))),
+ Object::new(brown, Sphere::new(100.0, Vector3f::new_xyz(0.0, -100.5, -1.0))),
+ Object::new(sun, Sphere::new(0.4, Vector3f::new_xyz(-1.0, 0.7, 0.0))),
]);
let tracer = DefaultTracer::new(&scn, Some(50),