pub struct LightQueueEntry(u64);Expand description
Vanilla’s packed light-propagation queue entry.
LightEngine.QueueEntry stores the source level in bits 0..3, one
propagation bit per vanilla Direction.ordinal() in bits 4..9, and two
increase flags in bits 10 and 11.
Tuple Fields§
§0: u64Implementations§
Source§impl LightQueueEntry
impl LightQueueEntry
Sourcepub const fn decrease_skip_one_direction(
old_from_level: u8,
skip_direction: Direction,
) -> Self
pub const fn decrease_skip_one_direction( old_from_level: u8, skip_direction: Direction, ) -> Self
Creates a decrease entry that propagates to all directions except one.
Sourcepub const fn decrease_all_directions(old_from_level: u8) -> Self
pub const fn decrease_all_directions(old_from_level: u8) -> Self
Creates a decrease entry that propagates to all directions.
Sourcepub const fn increase_light_from_emission(
new_from_level: u8,
from_empty_shape: bool,
) -> Self
pub const fn increase_light_from_emission( new_from_level: u8, from_empty_shape: bool, ) -> Self
Creates an increase entry sourced from a block’s light emission.
Sourcepub const fn increase_skip_one_direction(
new_from_level: u8,
from_empty_shape: bool,
skip_direction: Direction,
) -> Self
pub const fn increase_skip_one_direction( new_from_level: u8, from_empty_shape: bool, skip_direction: Direction, ) -> Self
Creates an increase entry that propagates to all directions except one.
Sourcepub const fn increase_only_one_direction(
new_from_level: u8,
from_empty_shape: bool,
direction: Direction,
) -> Self
pub const fn increase_only_one_direction( new_from_level: u8, from_empty_shape: bool, direction: Direction, ) -> Self
Creates an increase entry that propagates to exactly one direction.
Sourcepub fn increase_sky_source_in_directions(directions: &[Direction]) -> Self
pub fn increase_sky_source_in_directions(directions: &[Direction]) -> Self
Creates a sky-source increase entry for selected directions.
Sourcepub const fn from_raw(raw: u64) -> Self
pub const fn from_raw(raw: u64) -> Self
Creates a queue entry from vanilla’s packed representation.
Sourcepub const fn is_from_empty_shape(self) -> bool
pub const fn is_from_empty_shape(self) -> bool
Returns true if propagation starts from an empty occlusion shape.
Sourcepub const fn is_increase_from_emission(self) -> bool
pub const fn is_increase_from_emission(self) -> bool
Returns true if this increase came from block light emission.
Sourcepub const fn should_propagate_in_direction(self, direction: Direction) -> bool
pub const fn should_propagate_in_direction(self, direction: Direction) -> bool
Returns true if this entry propagates in direction.
const fn with_level(entry: u64, level: u8) -> Self
const fn with_direction(entry: u64, direction: Direction) -> u64
const fn without_direction(entry: u64, direction: Direction) -> u64
const fn direction_bit(direction: Direction) -> u64
const fn vanilla_direction_index(direction: Direction) -> u64
Trait Implementations§
Source§impl Clone for LightQueueEntry
impl Clone for LightQueueEntry
Source§fn clone(&self) -> LightQueueEntry
fn clone(&self) -> LightQueueEntry
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 LightQueueEntry
Source§impl Debug for LightQueueEntry
impl Debug for LightQueueEntry
impl Eq for LightQueueEntry
Source§impl PartialEq for LightQueueEntry
impl PartialEq for LightQueueEntry
impl StructuralPartialEq for LightQueueEntry
Auto Trait Implementations§
impl Freeze for LightQueueEntry
impl RefUnwindSafe for LightQueueEntry
impl Send for LightQueueEntry
impl Sync for LightQueueEntry
impl Unpin for LightQueueEntry
impl UnsafeUnpin for LightQueueEntry
impl UnwindSafe for LightQueueEntry
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self with key and returns true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreArc<SyncMutex<>>