#[repr(C)]pub struct PointLightData {
pub position: [f32; 3],
pub range: f32,
pub color: [f32; 3],
pub intensity: f32,
}Expand description
One point light entry in LightUniforms. Layout (32 bytes) must match PointLightData in every .metal shader. Same packed_float3 requirement as DirectionalLightData above.
Fields§
§position: [f32; 3]World-space position of the light source.
range: f32Maximum reach in metres; attenuation is zero at this distance.
color: [f32; 3]Linear RGB light colour.
intensity: f32Radiance scale.
Trait Implementations§
Source§impl Clone for PointLightData
impl Clone for PointLightData
Source§fn clone(&self) -> PointLightData
fn clone(&self) -> PointLightData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PointLightData
impl Pod for PointLightData
Auto Trait Implementations§
impl Freeze for PointLightData
impl RefUnwindSafe for PointLightData
impl Send for PointLightData
impl Sync for PointLightData
impl Unpin for PointLightData
impl UnsafeUnpin for PointLightData
impl UnwindSafe for PointLightData
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.