pub struct SpriteOccluder { /* private fields */ }Expand description
XS.2 — a WorldOccluder over sprite volumes, so sprites cast hard
shadows onto terrain and each other (and so a sprite-receive query also
sees other sprites). Owns the decoded SpriteDense grids; populate with
Self::push.
A world-space shadow ray is transformed into each sprite’s local frame and
the dense occupancy is DDA-marched. Assumes orthonormal unit instance bases
(as the sprite draw does); a non-uniform scale would skew the max_t
distance bound. Empty ⇒ casts nothing.
Implementations§
Source§impl SpriteOccluder
impl SpriteOccluder
Sourcepub fn push(
&mut self,
dense: Arc<SpriteDense>,
pos: [f32; 3],
s: [f32; 3],
h: [f32; 3],
f: [f32; 3],
)
pub fn push( &mut self, dense: Arc<SpriteDense>, pos: [f32; 3], s: [f32; 3], h: [f32; 3], f: [f32; 3], )
Add a decoded sprite volume at a world pose (pos = world pivot;
s/h/f = model→world basis columns, the same pose the draw uses).
A degenerate (non-invertible) basis is skipped. PF.8 — takes the
dense grid by Arc (an occluder rebuild shares the draw path’s
cached decodes instead of re-densifying every caster per frame).
Trait Implementations§
Source§impl Default for SpriteOccluder
impl Default for SpriteOccluder
Source§fn default() -> SpriteOccluder
fn default() -> SpriteOccluder
Source§impl WorldOccluder for SpriteOccluder
impl WorldOccluder for SpriteOccluder
Auto Trait Implementations§
impl Freeze for SpriteOccluder
impl RefUnwindSafe for SpriteOccluder
impl Send for SpriteOccluder
impl Sync for SpriteOccluder
impl Unpin for SpriteOccluder
impl UnsafeUnpin for SpriteOccluder
impl UnwindSafe for SpriteOccluder
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> 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