pub struct ChunkMesh<'a> {
pub verts: &'a [Vertex],
pub idxs: &'a [u16],
pub model: [[f32; 4]; 4],
pub texture_slot: usize,
pub normal_map_slot: usize,
pub material: MaterialUniforms,
pub frame: u64,
}Expand description
One streamed chunk’s geometry plus placement, supplied to
RenderBackend::add_chunk_mesh. frame reclaims retired deferred frees
before the chunk is placed in the streaming headroom.
Fields§
§verts: &'a [Vertex]Chunk vertices.
idxs: &'a [u16]Chunk indices, mesh-relative.
model: [[f32; 4]; 4]Column-major placement matrix.
texture_slot: usizeIndex into the shared texture pool for the albedo map.
normal_map_slot: usizeIndex into the shared texture pool for the normal map.
material: MaterialUniformsPer-chunk material scalars.
frame: u64Current frame number, used to reclaim retired deferred frees.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ChunkMesh<'a>
impl<'a> RefUnwindSafe for ChunkMesh<'a>
impl<'a> Send for ChunkMesh<'a>
impl<'a> Sync for ChunkMesh<'a>
impl<'a> Unpin for ChunkMesh<'a>
impl<'a> UnsafeUnpin for ChunkMesh<'a>
impl<'a> UnwindSafe for ChunkMesh<'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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 more