world: add builder pattern.
This commit is contained in:
parent
de898f0b0a
commit
44b46187a0
@ -1,3 +1,5 @@
|
||||
use derive_builder::Builder;
|
||||
|
||||
use crate::{
|
||||
intersections::{prepare_computations, Intersections, PrecomputedData},
|
||||
lights::PointLight,
|
||||
@ -20,7 +22,8 @@ use crate::{
|
||||
/// assert_eq!(w.lights.len(), 0);
|
||||
/// ```
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
#[derive(Builder, Clone, Debug, Default)]
|
||||
#[builder(default)]
|
||||
pub struct World {
|
||||
pub lights: Vec<PointLight>,
|
||||
pub objects: Vec<Shape>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user