pub struct PackedLightQueueEntry(u64);Expand description
ScalableLux packed light-propagation queue entry.
The lower 28 bits store PackedLightBlockPos, followed by a 4-bit light
level and a 6-bit LightDirectionSet. Bits 61, 62, and 63 carry
LightQueueFlags; the middle 23 bits are intentionally unused to preserve
ScalableLux’s layout.
Tuple Fields§
§0: u64Implementations§
Source§impl PackedLightQueueEntry
impl PackedLightQueueEntry
Sourcepub const fn from_parts(
block_pos: PackedLightBlockPos,
level: u8,
directions: LightDirectionSet,
flags: LightQueueFlags,
) -> Self
pub const fn from_parts( block_pos: PackedLightBlockPos, level: u8, directions: LightDirectionSet, flags: LightQueueFlags, ) -> Self
Creates a packed queue entry from typed ScalableLux parts.
Sourcepub const fn from_raw(raw: u64) -> Self
pub const fn from_raw(raw: u64) -> Self
Creates a packed queue entry from raw ScalableLux queue bits.
Sourcepub const fn block_pos(self) -> PackedLightBlockPos
pub const fn block_pos(self) -> PackedLightBlockPos
Returns the packed block position stored in this queue entry.
Sourcepub const fn directions(self) -> LightDirectionSet
pub const fn directions(self) -> LightDirectionSet
Returns the propagation direction set.
Sourcepub const fn flags(self) -> LightQueueFlags
pub const fn flags(self) -> LightQueueFlags
Returns the top-bit state flags.
Sourcepub const fn should_write_level(self) -> bool
pub const fn should_write_level(self) -> bool
Returns true when the increase pass should write this entry’s level.
Sourcepub const fn should_recheck_level(self) -> bool
pub const fn should_recheck_level(self) -> bool
Returns true when the increase pass should confirm the current level.
Sourcepub const fn has_sided_transparent_blocks(self) -> bool
pub const fn has_sided_transparent_blocks(self) -> bool
Returns true when propagation must account for sided transparent shapes.
Trait Implementations§
Source§impl Clone for PackedLightQueueEntry
impl Clone for PackedLightQueueEntry
Source§fn clone(&self) -> PackedLightQueueEntry
fn clone(&self) -> PackedLightQueueEntry
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 PackedLightQueueEntry
Source§impl Debug for PackedLightQueueEntry
impl Debug for PackedLightQueueEntry
impl Eq for PackedLightQueueEntry
Source§impl Hash for PackedLightQueueEntry
impl Hash for PackedLightQueueEntry
Source§impl PartialEq for PackedLightQueueEntry
impl PartialEq for PackedLightQueueEntry
impl StructuralPartialEq for PackedLightQueueEntry
Auto Trait Implementations§
impl Freeze for PackedLightQueueEntry
impl RefUnwindSafe for PackedLightQueueEntry
impl Send for PackedLightQueueEntry
impl Sync for PackedLightQueueEntry
impl Unpin for PackedLightQueueEntry
impl UnsafeUnpin for PackedLightQueueEntry
impl UnwindSafe for PackedLightQueueEntry
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,
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
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
Compares
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> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>