pub struct ChunkXyBacking<'a> {
pub chunks: Vec<Option<GridView<'a>>>,
pub origin_chunk_xy: [i32; 2],
pub origin_chunk_z: i32,
pub chunks_x: u32,
pub chunks_y: u32,
pub chunks_z: u32,
}Expand description
S4B.2.c.3: chx/chy chunk table built from a Grid.
Owns the Vec<Option<GridView>> so roxlap_core::ChunkGrid
(which borrows the table) can live alongside the GridView
constructed from it. Used by the Approach B render path —
see Grid::chunk_xy_backing.
S4B.6.a: gained chunks_z + origin_chunk_z for tall-world
support. Pre-S4B.6.a chunk_xy_backing always populates these
as chunks_z=1 origin_chunk_z=0 (= chz=0 only); S4B.6.c will
switch the render path to chunk_xyz_backing once the
rasterizer is stack-aware.
Fields§
§chunks: Vec<Option<GridView<'a>>>Per-chunk views over the chx/chy/chz extent.
Length chunks_x * chunks_y * chunks_z; index layout
[(dz * chunks_y + dy) * chunks_x + dx]. None for
implicit-air chunks inside the bbox.
origin_chunk_xy: [i32; 2]XY index of the chunk at chunks[0] — the minimum chx/chy
among populated chunks at chz = origin_chunk_z.
origin_chunk_z: i32Z index of the chunk at chunks[0].
chunks_x: u32Number of chunks along the X axis. Row stride.
chunks_y: u32Number of chunks along the Y axis.
chunks_z: u32Number of chunks along the Z axis. 1 from
Grid::chunk_xy_backing; >1 only via the S4B.6.a
Grid::chunk_xyz_backing.
Auto Trait Implementations§
impl<'a> Freeze for ChunkXyBacking<'a>
impl<'a> RefUnwindSafe for ChunkXyBacking<'a>
impl<'a> Send for ChunkXyBacking<'a>
impl<'a> Sync for ChunkXyBacking<'a>
impl<'a> Unpin for ChunkXyBacking<'a>
impl<'a> UnsafeUnpin for ChunkXyBacking<'a>
impl<'a> UnwindSafe for ChunkXyBacking<'a>
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> 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 more