pub struct RigDirectionalLight3D { /* private fields */ }Expand description
Physical directional Sun/Moon emitter with Cascaded Shadow Map parameters.
Implementations§
Source§impl RigDirectionalLight3D
Constructors, CSM computation, and direct shading helpers for RigDirectionalLight3D.
impl RigDirectionalLight3D
Constructors, CSM computation, and direct shading helpers for RigDirectionalLight3D.
Sourcepub fn from_kelvin(direction: Vec3, kelvin: f32, illuminance: f32) -> Self
pub fn from_kelvin(direction: Vec3, kelvin: f32, illuminance: f32) -> Self
Sourcepub fn compute_csm_splits(
&self,
camera: &Camera3D,
aspect: f32,
shadow_map_res: u32,
) -> CsmCascadeSplits
pub fn compute_csm_splits( &self, camera: &Camera3D, aspect: f32, shadow_map_res: u32, ) -> CsmCascadeSplits
Sourcepub fn to_world_directional(
&self,
sky_zenith: Vec3,
sky_horizon: Vec3,
time_of_day: f32,
) -> DirectionalLight3D
pub fn to_world_directional( &self, sky_zenith: Vec3, sky_horizon: Vec3, time_of_day: f32, ) -> DirectionalLight3D
Sourcepub fn evaluate_direct(
&self,
normal: Vec3,
view_dir: Vec3,
material: &PbrMaterial,
) -> Vec3
pub fn evaluate_direct( &self, normal: Vec3, view_dir: Vec3, material: &PbrMaterial, ) -> Vec3
Source§impl RigDirectionalLight3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl RigDirectionalLight3D
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_direction(&self) -> Vec3
pub fn get_mut_direction(&mut self) -> &mut Vec3
pub fn set_direction(&mut self, val: Vec3) -> &mut Self
pub fn get_color(&self) -> Vec3
pub fn get_mut_color(&mut self) -> &mut Vec3
pub fn set_color(&mut self, val: Vec3) -> &mut Self
pub fn get_illuminance(&self) -> f32
pub fn get_mut_illuminance(&mut self) -> &mut f32
pub fn set_illuminance(&mut self, val: f32) -> &mut Self
pub fn get_angular_radius_rad(&self) -> f32
pub fn get_mut_angular_radius_rad(&mut self) -> &mut f32
pub fn set_angular_radius_rad(&mut self, val: f32) -> &mut Self
pub fn get_cast_shadows(&self) -> bool
pub fn get_mut_cast_shadows(&mut self) -> &mut bool
pub fn set_cast_shadows(&mut self, val: bool) -> &mut Self
pub fn get_shadow_bias(&self) -> f32
pub fn get_mut_shadow_bias(&mut self) -> &mut f32
pub fn set_shadow_bias(&mut self, val: f32) -> &mut Self
pub fn get_cascade_count(&self) -> usize
pub fn get_mut_cascade_count(&mut self) -> &mut usize
pub fn set_cascade_count(&mut self, val: usize) -> &mut Self
pub fn get_csm_lambda(&self) -> f32
pub fn get_mut_csm_lambda(&mut self) -> &mut f32
pub fn set_csm_lambda(&mut self, val: f32) -> &mut Self
pub fn get_max_shadow_distance(&self) -> f32
pub fn get_mut_max_shadow_distance(&mut self) -> &mut f32
pub fn set_max_shadow_distance(&mut self, val: f32) -> &mut Self
Trait Implementations§
Source§impl Clone for RigDirectionalLight3D
impl Clone for RigDirectionalLight3D
impl Copy for RigDirectionalLight3D
Source§impl Debug for RigDirectionalLight3D
impl Debug for RigDirectionalLight3D
Source§impl PartialEq for RigDirectionalLight3D
impl PartialEq for RigDirectionalLight3D
impl StructuralPartialEq for RigDirectionalLight3D
Auto Trait Implementations§
impl Forget for RigDirectionalLight3D
impl Freeze for RigDirectionalLight3D
impl Move for RigDirectionalLight3D
impl RefUnwindSafe for RigDirectionalLight3D
impl Send for RigDirectionalLight3D
impl Sync for RigDirectionalLight3D
impl Unpin for RigDirectionalLight3D
impl UnsafeUnpin for RigDirectionalLight3D
impl UnwindSafe for RigDirectionalLight3D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more