pub struct AreaLight3D { /* private fields */ }Expand description
Physically based Blender rectangular or disk area light evaluated with representative-point GGX and horizon-clamped irradiance.
Implementations§
Source§impl AreaLight3D
Construction and representative-point GGX / LTC-aligned evaluation for AreaLight3D.
impl AreaLight3D
Construction and representative-point GGX / LTC-aligned evaluation for AreaLight3D.
Sourcepub fn new_rect(
position: Vec3,
direction: Vec3,
color: Vec3,
intensity: f32,
dimensions: (f32, f32),
range: f32,
) -> Self
pub fn new_rect( position: Vec3, direction: Vec3, color: Vec3, intensity: f32, dimensions: (f32, f32), range: f32, ) -> Self
Constructs a rectangular Blender AreaLight3D oriented along direction.
§Arguments
Vec3- World-space emitter center.Vec3- Unit emitting normal pointing from emitter into scene.Vec3- Linear HDR RGB emission color.f32- Luminous intensity multiplier.(f32, f32)- Aperture(width, height)in meters.f32- Maximum attenuation cutoff range in meters.
§Returns
Self- Configured rectangular area light.
Sourcepub fn new_disk(
position: Vec3,
direction: Vec3,
color: Vec3,
intensity: f32,
diameter: f32,
range: f32,
) -> Self
pub fn new_disk( position: Vec3, direction: Vec3, color: Vec3, intensity: f32, diameter: f32, range: f32, ) -> Self
Constructs a disk Blender AreaLight3D oriented along direction.
§Arguments
Vec3- World-space emitter center.Vec3- Unit emitting normal pointing from emitter into scene.Vec3- Linear HDR RGB emission color.f32- Luminous intensity multiplier.f32- Disk emitter diameter in meters.f32- Maximum attenuation cutoff range in meters.
§Returns
Self- Configured disk area light.
Sourcepub fn evaluate_pbr(
&self,
world_pos: Vec3,
normal: Vec3,
view_dir: Vec3,
material_terms: (Vec3, Vec3, f32, f32),
) -> Vec3
pub fn evaluate_pbr( &self, world_pos: Vec3, normal: Vec3, view_dir: Vec3, material_terms: (Vec3, Vec3, f32, f32), ) -> Vec3
Evaluates physically based diffuse irradiance and Karis representative-point GGX specular contribution for this rectangular or disk area light.
§Arguments
&Self- Area light reference.Vec3- World-space surface shading position.Vec3- Unit outward surface normal.Vec3- Unit view direction pointing from surface toward camera.(Vec3, Vec3, f32, f32)-(albedo, f0_specular, perceptual_roughness, diffuse_scale).
§Returns
Vec3- Linear HDR direct radiance contributed by this area light.
Source§impl AreaLight3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl AreaLight3D
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_position(&self) -> Vec3
pub fn get_mut_position(&mut self) -> &mut Vec3
pub fn set_position(&mut self, val: Vec3) -> &mut Self
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_right(&self) -> Vec3
pub fn get_mut_right(&mut self) -> &mut Vec3
pub fn set_right(&mut self, val: Vec3) -> &mut Self
pub fn get_up(&self) -> Vec3
pub fn get_mut_up(&mut self) -> &mut Vec3
pub fn set_up(&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_intensity(&self) -> f32
pub fn get_mut_intensity(&mut self) -> &mut f32
pub fn set_intensity(&mut self, val: f32) -> &mut Self
pub fn get_width(&self) -> f32
pub fn get_mut_width(&mut self) -> &mut f32
pub fn set_width(&mut self, val: f32) -> &mut Self
pub fn get_height(&self) -> f32
pub fn get_mut_height(&mut self) -> &mut f32
pub fn set_height(&mut self, val: f32) -> &mut Self
pub fn get_range(&self) -> f32
pub fn get_mut_range(&mut self) -> &mut f32
pub fn set_range(&mut self, val: f32) -> &mut Self
pub fn get_shape(&self) -> AreaLightShape3D
pub fn get_mut_shape(&mut self) -> &mut AreaLightShape3D
pub fn set_shape(&mut self, val: AreaLightShape3D) -> &mut Self
pub fn get_two_sided(&self) -> bool
pub fn get_mut_two_sided(&mut self) -> &mut bool
pub fn set_two_sided(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for AreaLight3D
impl Clone for AreaLight3D
impl Copy for AreaLight3D
Source§impl Debug for AreaLight3D
impl Debug for AreaLight3D
Source§impl PartialEq for AreaLight3D
impl PartialEq for AreaLight3D
impl StructuralPartialEq for AreaLight3D
Auto Trait Implementations§
impl Forget for AreaLight3D
impl Freeze for AreaLight3D
impl Move for AreaLight3D
impl RefUnwindSafe for AreaLight3D
impl Send for AreaLight3D
impl Sync for AreaLight3D
impl Unpin for AreaLight3D
impl UnsafeUnpin for AreaLight3D
impl UnwindSafe for AreaLight3D
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