pub struct ChunkSurface {
pub color: Vec<u8>,
pub height: Vec<f32>,
pub normal: Vec<u8>,
}Expand description
A resampled per-chunk surface: color is tile_res·tile_res·4 RGBA8,
height is tile_res·tile_res elevations (the provider’s vertical unit,
scaled by CpuSurfaceProvider::height_scale on the GPU), and normal is
tile_res·tile_res·4 rgba8-packed world normals — all row-major. The chunk’s
real footprint is the lower-left triangle, but the WHOLE square holds valid
data (texels past the diagonal replicate the nearest diagonal sample; see
[crate::surface_tiles::build_patch]).
Fields§
§color: Vec<u8>§height: Vec<f32>§normal: Vec<u8>Trait Implementations§
Source§impl Clone for ChunkSurface
impl Clone for ChunkSurface
Source§fn clone(&self) -> ChunkSurface
fn clone(&self) -> ChunkSurface
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 moreAuto Trait Implementations§
impl Freeze for ChunkSurface
impl RefUnwindSafe for ChunkSurface
impl Send for ChunkSurface
impl Sync for ChunkSurface
impl Unpin for ChunkSurface
impl UnsafeUnpin for ChunkSurface
impl UnwindSafe for ChunkSurface
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