aboutsummaryrefslogtreecommitdiff
path: root/src/world
diff options
context:
space:
mode:
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,