pub struct WorldShadowCtx<'a> {
pub occluder: &'a dyn WorldOccluder,
pub origin: [f32; 3],
pub cols: [[f32; 3]; 3],
}Expand description
XS.1 — per-grid context for a cross-scene shadow query: the scene-wide
WorldOccluder plus the current grid’s local→world transform, so a
grid-local shadow ray (the frame shade_dynamic works in) can be lifted
to world space before the scene-wide test. cols[i] is the world-space
image of grid-local axis i (the grid rotation’s columns); origin is the
grid’s world origin.
Fields§
§occluder: &'a dyn WorldOccluder§origin: [f32; 3]§cols: [[f32; 3]; 3]Implementations§
Source§impl<'a> WorldShadowCtx<'a>
impl<'a> WorldShadowCtx<'a>
Sourcepub fn identity(occluder: &'a dyn WorldOccluder) -> Self
pub fn identity(occluder: &'a dyn WorldOccluder) -> Self
Identity transform — for shading already in world space (sprites): the grid-local ray IS the world ray.
Trait Implementations§
Source§impl<'a> Clone for WorldShadowCtx<'a>
impl<'a> Clone for WorldShadowCtx<'a>
Source§fn clone(&self) -> WorldShadowCtx<'a>
fn clone(&self) -> WorldShadowCtx<'a>
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<'a> Copy for WorldShadowCtx<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WorldShadowCtx<'a>
impl<'a> !UnwindSafe for WorldShadowCtx<'a>
impl<'a> Freeze for WorldShadowCtx<'a>
impl<'a> Send for WorldShadowCtx<'a>
impl<'a> Sync for WorldShadowCtx<'a>
impl<'a> Unpin for WorldShadowCtx<'a>
impl<'a> UnsafeUnpin for WorldShadowCtx<'a>
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
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>
Converts
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>
Converts
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