library: render: rename LightAggregate fields

This commit is contained in:
Bruno BELANYI 2020-03-17 22:46:25 +01:00
parent 852cd65c6a
commit d6f5f29a2a

View file

@ -1,11 +1,12 @@
use crate::light; use crate::light::*;
use std::iter::Iterator;
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct LightAggregate { pub struct LightAggregate {
ambient_lights: Vec<light::AmbientLight>, ambients: Vec<AmbientLight>,
directional_lights: Vec<light::DirectionalLight>, directionals: Vec<DirectionalLight>,
point_lights: Vec<light::PointLight>, points: Vec<PointLight>,
spot_lights: Vec<light::SpotLight>, spots: Vec<SpotLight>,
} }
impl LightAggregate { impl LightAggregate {
@ -14,16 +15,16 @@ impl LightAggregate {
} }
pub fn new( pub fn new(
ambient_lights: Vec<light::AmbientLight>, ambients: Vec<AmbientLight>,
directional_lights: Vec<light::DirectionalLight>, directionals: Vec<DirectionalLight>,
point_lights: Vec<light::PointLight>, points: Vec<PointLight>,
spot_lights: Vec<light::SpotLight>, spots: Vec<SpotLight>,
) -> Self { ) -> Self {
LightAggregate { LightAggregate {
ambient_lights, ambients,
directional_lights, directionals,
point_lights, points,
spot_lights, spots,
} }
} }
} }
@ -44,10 +45,10 @@ mod test {
assert_eq!( assert_eq!(
lights, lights,
LightAggregate { LightAggregate {
ambient_lights: vec![], ambients: vec![],
directional_lights: vec![], directionals: vec![],
point_lights: vec![], points: vec![],
spot_lights: vec![], spots: vec![],
} }
) )
} }