pub struct CutawayVolume { /* private fields */ }Expand description
CA.4 — a grid’s cutaway volume, precomputed for the footprint
rule: the grid’s world→local transform + its materialised XY
chunk footprint + the clip plane, hoisted out of the per-point test
so one frame can test many points (sprites, particles, lights)
cheaply. Build via Grid::cutaway_volume; the one-shot
convenience is Grid::cutaway_hides_point. Both renderers hide
sprite instances by exactly this volume, so host-side culls (the
deck-light pattern) stay in perfect agreement with the render.
Implementations§
Source§impl CutawayVolume
impl CutawayVolume
Sourcepub fn hides_point(&self, world: DVec3) -> bool
pub fn hides_point(&self, world: DVec3) -> bool
Whether the footprint rule hides the world-space point: mapped
into the grid’s local voxel frame, it lands inside the XY
footprint with z < z_clip (z-down).
Trait Implementations§
Source§impl Clone for CutawayVolume
impl Clone for CutawayVolume
Source§fn clone(&self) -> CutawayVolume
fn clone(&self) -> CutawayVolume
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 CutawayVolume
Auto Trait Implementations§
impl Freeze for CutawayVolume
impl RefUnwindSafe for CutawayVolume
impl Send for CutawayVolume
impl Sync for CutawayVolume
impl Unpin for CutawayVolume
impl UnsafeUnpin for CutawayVolume
impl UnwindSafe for CutawayVolume
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