pub struct EndColumnCache {Show 22 fields
pub x: i32,
pub z: i32,
qx: i32,
qz: i32,
valid: bool,
grid_first_quart_x: i32,
grid_first_quart_z: i32,
has_grid: bool,
pub df_end__islands: f32,
pub router_continentalness: f32,
pub router_depth: f32,
pub router_erosion: f32,
pub router_ridges: f32,
pub router_temperature: f32,
pub router_vegetation: f32,
grid_df_end__islands: [f32; 9],
grid_router_continentalness: [f32; 9],
grid_router_depth: [f32; 9],
grid_router_erosion: [f32; 9],
grid_router_ridges: [f32; 9],
grid_router_temperature: [f32; 9],
grid_router_vegetation: [f32; 9],
}Expand description
Column-level cache for xz-only density function results.
Supports two modes:
- Grid mode (
init_grid()called): Pre-computes a 2D grid of all in-chunk quart positions.ensure()does O(1) grid lookups for exact grid points and evaluates other positions on the fly. - No-grid mode (default): Single-entry lazy cache that recomputes when the exact coordinates change.
Fields§
§x: i32Raw x block coordinate (for non-flat router functions).
z: i32Raw z block coordinate (for non-flat router functions).
qx: i32X coordinate used to evaluate the cached values.
qz: i32Z coordinate used to evaluate the cached values.
valid: bool§grid_first_quart_x: i32§grid_first_quart_z: i32§has_grid: bool§df_end__islands: f32§router_continentalness: f32§router_depth: f32§router_erosion: f32§router_ridges: f32§router_temperature: f32§router_vegetation: f32§grid_df_end__islands: [f32; 9]§grid_router_continentalness: [f32; 9]§grid_router_depth: [f32; 9]§grid_router_erosion: [f32; 9]§grid_router_ridges: [f32; 9]§grid_router_temperature: [f32; 9]§grid_router_vegetation: [f32; 9]Implementations§
Source§impl EndColumnCache
impl EndColumnCache
Sourcepub fn init_grid(
&mut self,
chunk_block_x: i32,
chunk_block_z: i32,
noises: &EndNoises,
)
pub fn init_grid( &mut self, chunk_block_x: i32, chunk_block_z: i32, noises: &EndNoises, )
Pre-compute flat-cached values for all quart positions in a chunk.
After this call, ensure() for matching grid points copies from
the grid (O(1)). Other positions are evaluated at their exact
coordinates.
Trait Implementations§
Source§impl Clone for EndColumnCache
impl Clone for EndColumnCache
Auto Trait Implementations§
impl Freeze for EndColumnCache
impl RefUnwindSafe for EndColumnCache
impl Send for EndColumnCache
impl Sync for EndColumnCache
impl Unpin for EndColumnCache
impl UnsafeUnpin for EndColumnCache
impl UnwindSafe for EndColumnCache
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<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<>>