pub struct CpuPointLight {
pub pos: [f32; 3],
pub color: [f32; 3],
pub intensity: f32,
pub radius: f32,
pub casts_shadow: bool,
pub spot_dir: [f32; 3],
pub cos_inner: f32,
pub cos_outer: f32,
}Expand description
CPU.1 — one point light in a grid’s local frame for the CPU renderer.
Fields§
§pos: [f32; 3]Grid-local position (world/voxel units).
color: [f32; 3]Linear RGB, 0..1.
intensity: f32§radius: f32Hard cutoff distance (world/voxel units).
casts_shadow: boolCPU.2 — whether this light casts a hard shadow (a shadow ray
marches to the light through the grid’s voxels). Mirrors the
GPU’s per-light casts_shadow; the renderer applies the same
caster cap before building the CPU rig.
spot_dir: [f32; 3]SL — spot (cone) axis: grid-local unit direction the light shines
along. Ignored for a pure point light (see Self::cos_outer).
cos_inner: f32SL — cosine of the inner cone half-angle (full brightness within it).
cos_outer: f32SL — cosine of the outer cone half-angle (zero past it; soft
smoothstep between the two). -1.0 (a 180° cone) ⇒ a pure point
light: the cone mask is skipped entirely and the light is omnidirectional.
Trait Implementations§
Source§impl Clone for CpuPointLight
impl Clone for CpuPointLight
Source§fn clone(&self) -> CpuPointLight
fn clone(&self) -> CpuPointLight
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CpuPointLight
Auto Trait Implementations§
impl Freeze for CpuPointLight
impl RefUnwindSafe for CpuPointLight
impl Send for CpuPointLight
impl Sync for CpuPointLight
impl Unpin for CpuPointLight
impl UnsafeUnpin for CpuPointLight
impl UnwindSafe for CpuPointLight
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more