aboutsummaryrefslogtreecommitdiff
path: root/src/world
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-12 23:33:50 +0100
committerJulian T <julian@jtle.dk>2021-02-12 23:34:09 +0100
commit14f7b47f2c2315d0de5e52d31c57fe07a15d08ad (patch)
treef512e7e0939fd151cf9196004611e3cd82a95773 /src/world
parent49c6adb0db70ffc30eaac33b66eacf7574b34e26 (diff)
Implement multithreaded compiling of tiles
Diffstat (limited to 'src/world')
-rw-r--r--src/world/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/world/mod.rs b/src/world/mod.rs
index ef239db..f0ba8d2 100644
--- a/src/world/mod.rs
+++ b/src/world/mod.rs
@@ -4,17 +4,17 @@ pub mod shapes;
mod scene;
pub use scene::*;
-use std::rc::Rc;
+use std::sync::Arc;
use crate::core::Hittable;
use crate::material::Material;
pub struct Object {
- pub shape: Box<dyn Hittable>,
- pub mat: Rc<dyn Material>,
+ pub shape: Box<dyn Hittable + Sync>,
+ pub mat: Arc<dyn Material + Sync + Send>,
}
impl Object {
- pub fn new(mat: Rc<dyn Material>, shape: Box<dyn Hittable>) -> Self {
+ pub fn new(mat: Arc<dyn Material + Sync + Send>, shape: Box<dyn Hittable + Sync>) -> Self {
Object {
mat,
shape,