#[repr(C)]pub struct AreaLightData {
pub right: [f32; 3],
pub two_sided: u32,
pub up: [f32; 3],
pub _pad: f32,
}Expand description
One rectangular area light’s extent, indexed by GpuLight.data_index. The
centre is the GpuLight’s position and the emitting direction its
direction; only the two in-plane edge vectors and the sidedness flag need
the extra room.
32 bytes: a scalar follows each vec3 so the MSL (packed_float3), HLSL (float3, no 16-byte straddle), and GLSL std430 (vec3 align-16) layouts all agree.
Fields§
§right: [f32; 3]Half-width times the panel’s width axis, in world units.
two_sided: u321 when the panel emits from both faces, 0 when it emits only along
GpuLight.direction.
up: [f32; 3]Half-height times the panel’s height axis, in world units.
_pad: f32Padding so the field layout matches the shader-side struct.
Implementations§
Source§impl AreaLightData
impl AreaLightData
Sourcepub const ZERO: AreaLightData
pub const ZERO: AreaLightData
An all-zero entry, used to fill unused slots.
Trait Implementations§
Source§impl Clone for AreaLightData
impl Clone for AreaLightData
Source§fn clone(&self) -> AreaLightData
fn clone(&self) -> AreaLightData
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 AreaLightData
Source§impl Debug for AreaLightData
impl Debug for AreaLightData
impl NoUninit for AreaLightData
Auto Trait Implementations§
impl Freeze for AreaLightData
impl RefUnwindSafe for AreaLightData
impl Send for AreaLightData
impl Sync for AreaLightData
impl Unpin for AreaLightData
impl UnsafeUnpin for AreaLightData
impl UnwindSafe for AreaLightData
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