pub struct Occluders {
occluders: Vec<Occluder>,
events: Vec<OcclusionEvent>,
active: Vec<Range<i32>>,
}
Expand description
List of registered occluders.
Also store a couple of vectors for reuse.
Fields§
§occluders: Vec<Occluder>
§events: Vec<OcclusionEvent>
§active: Vec<Range<i32>>
Implementations§
source§impl Occluders
impl Occluders
fn new() -> Self
fn push(&mut self, world_rect: WorldIntRect, z_id: ZBufferId)
sourcepub fn is_tile_occluded(
&mut self,
z_id: ZBufferId,
world_rect: WorldRect,
) -> bool
pub fn is_tile_occluded( &mut self, z_id: ZBufferId, world_rect: WorldRect, ) -> bool
Returns true if a tile with the specified rectangle and z_id is occluded by an opaque surface in front of it.
sourcefn area(&mut self, z_id: ZBufferId, clip_rect: &WorldIntRect) -> i32
fn area(&mut self, z_id: ZBufferId, clip_rect: &WorldIntRect) -> i32
Return the total area covered by a set of occluders, accounting for overlapping areas between those rectangles.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Occluders
impl RefUnwindSafe for Occluders
impl Send for Occluders
impl Sync for Occluders
impl Unpin for Occluders
impl UnwindSafe for Occluders
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> 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