struct AquiferColumnCache {
world_x: i32,
world_z: i32,
y_anchor: i32,
cell_loc_y: [i32; 16],
cell_xz_dist_sq: [i32; 16],
cell_idx: [u32; 12],
}Expand description
Column-scan state for the 12 aquifer-neighborhood cells, stored SoA so the
per-Y distance computation can be SIMD-batched as 3× i32x4.
compute_substance is called many times with the same (world_x, world_z)
and decreasing world_y (innermost loop in noise_chunk::fill). Within a
stable y_anchor window (Y_SPACING blocks tall) the 12 cells of the
neighborhood don’t change, and dx*dx + dz*dz only depends on x/z — only
dy = loc_y - world_y varies per call.
y_anchor = i32::MIN marks the cache as invalid (forces a refill).
Fields§
§world_x: i32§world_z: i32§y_anchor: i32§cell_loc_y: [i32; 16]Per-cell unpacked Y of the aquifer-cell center (constant while cached).
Padded to 16 entries so the 12 valid cells fit cleanly into 3× i32x4
SIMD batches; trailing slots stay at default 0.
cell_xz_dist_sq: [i32; 16]Per-cell (dx + fx)² + (dz + fz)² (Y-independent component of distance).
cell_idx: [u32; 12]Per-cell index into location_cache / status_cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AquiferColumnCache
impl RefUnwindSafe for AquiferColumnCache
impl Send for AquiferColumnCache
impl Sync for AquiferColumnCache
impl Unpin for AquiferColumnCache
impl UnsafeUnpin for AquiferColumnCache
impl UnwindSafe for AquiferColumnCache
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
§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<>>