lights & world: derive Clone for PointLight and World.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
use crate::tuples::{Color, Tuple};
|
use crate::tuples::{Color, Tuple};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub struct PointLight {
|
pub struct PointLight {
|
||||||
pub position: Tuple,
|
pub position: Tuple,
|
||||||
pub intensity: Color,
|
pub intensity: Color,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ use crate::{
|
|||||||
/// assert_eq!(w.light, None);
|
/// assert_eq!(w.light, None);
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
#[derive(Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct World {
|
pub struct World {
|
||||||
// TODO(wathiede): make this a list of abstract Light traits.
|
// TODO(wathiede): make this a list of abstract Light traits.
|
||||||
pub light: Option<PointLight>,
|
pub light: Option<PointLight>,
|
||||||
|
|||||||
Reference in New Issue
Block a user