pub struct SpotLightDesc {
pub position: [f32; 3],
pub direction: [f32; 3],
pub color: [f32; 3],
pub intensity_lumens: f32,
pub range: f32,
pub inner_cos: f32,
pub outer_cos: f32,
}Expand description
Spot light (cone-shaped, finite range).
Fields§
§position: [f32; 3]World-space position.
direction: [f32; 3]Cone direction (normalized).
color: [f32; 3]Light color (RGB linear).
intensity_lumens: f32Luminous intensity in lumens.
range: f32Attenuation range in world units.
inner_cos: f32Cosine of inner cone half-angle (full intensity inside).
outer_cos: f32Cosine of outer cone half-angle (zero intensity outside).
Trait Implementations§
Source§impl Clone for SpotLightDesc
impl Clone for SpotLightDesc
Source§fn clone(&self) -> SpotLightDesc
fn clone(&self) -> SpotLightDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpotLightDesc
impl Debug for SpotLightDesc
Source§impl Default for SpotLightDesc
impl Default for SpotLightDesc
Source§impl<'de> Deserialize<'de> for SpotLightDesc
impl<'de> Deserialize<'de> for SpotLightDesc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SpotLightDesc
impl PartialEq for SpotLightDesc
Source§impl Serialize for SpotLightDesc
impl Serialize for SpotLightDesc
impl Copy for SpotLightDesc
impl StructuralPartialEq for SpotLightDesc
Auto Trait Implementations§
impl Freeze for SpotLightDesc
impl RefUnwindSafe for SpotLightDesc
impl Send for SpotLightDesc
impl Sync for SpotLightDesc
impl Unpin for SpotLightDesc
impl UnsafeUnpin for SpotLightDesc
impl UnwindSafe for SpotLightDesc
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