pub struct SpotLight3D { /* private fields */ }Expand description
Dynamic physically based 3D spotlight (vehicle headlights, streetlamps, volumetric beams) for Clustered Deferred Shading.
Implementations§
Source§impl SpotLight3D
Constructors for SpotLight3D.
impl SpotLight3D
Constructors for SpotLight3D.
Sourcepub fn new(
position: Vec3,
direction: Vec3,
color: Color,
intensity: f32,
range: f32,
cone_deg: (f32, f32),
) -> Self
pub fn new( position: Vec3, direction: Vec3, color: Color, intensity: f32, range: f32, cone_deg: (f32, f32), ) -> Self
Creates a physically based 3D spotlight from position, direction, sRGB color, intensity, range, and cone half-angles in degrees.
§Arguments
Vec3- World-space emitter origin.Vec3- Beam direction vector (normalized automatically).Color- sRGB emission color.f32- Luminous intensity multiplier.f32- Maximum beam range in meters.(f32, f32)-(inner_half_angle_deg, outer_half_angle_deg)cone angles.
§Returns
Self- Configured spotlight.
Source§impl SpotLight3D
impl SpotLight3D
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_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_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_inner_cos(&self) -> f32
pub fn get_mut_inner_cos(&mut self) -> &mut f32
pub fn set_inner_cos(&mut self, val: f32) -> &mut Self
pub fn get_outer_cos(&self) -> f32
pub fn get_mut_outer_cos(&mut self) -> &mut f32
pub fn set_outer_cos(&mut self, val: f32) -> &mut Self
Trait Implementations§
Source§impl Clone for SpotLight3D
impl Clone for SpotLight3D
impl Copy for SpotLight3D
Source§impl Debug for SpotLight3D
impl Debug for SpotLight3D
Source§impl PartialEq for SpotLight3D
impl PartialEq for SpotLight3D
impl StructuralPartialEq for SpotLight3D
Auto Trait Implementations§
impl Forget for SpotLight3D
impl Freeze for SpotLight3D
impl Move for SpotLight3D
impl RefUnwindSafe for SpotLight3D
impl Send for SpotLight3D
impl Sync for SpotLight3D
impl Unpin for SpotLight3D
impl UnsafeUnpin for SpotLight3D
impl UnwindSafe for SpotLight3D
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