Struct caper::lighting::Lighting
[−]
[src]
pub struct Lighting { pub directional_tex: RefCell<Texture1d>, // some fields omitted }
Struct containing the data for the lighting system
Fields
directional_tex: RefCell<Texture1d>
Texture representing the positions of the directional lights
Methods
impl Lighting
[src]
fn new<F>(facade: &F) -> Lighting where
F: Facade + Clone,
[src]
F: Facade + Clone,
Create a new lighting system
fn add_directional_light(&mut self, name: String, dir: Vector3)
[src]
Add a direction light with direction dir to the lighting system
fn regenerate_lighting_tex(&mut self)
[src]
Regenerates the tex that is used to send location to shader Note: must be called when mutating any lighting data
fn get_directional_light(&mut self, index: usize) -> &mut DirectionalLight
[src]
Get a ref to a directional light
fn get_directional_light_by_name(
&mut self,
name: String
) -> Option<&mut DirectionalLight>
[src]
&mut self,
name: String
) -> Option<&mut DirectionalLight>
Get a ref to a directional light from its name, returning the first found