pub struct HeightMeshBuffer {
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub indices: Vec<u32>,
pub stride_to_index: Vec<u32>,
}
Expand description
The output buffers used by height_mesh
. These buffers can be reused to avoid reallocating memory.
Fields§
§positions: Vec<[f32; 3]>
The surface positions.
normals: Vec<[f32; 3]>
The surface normals.
The normals are not normalized, since that is done most efficiently on the GPU.
indices: Vec<u32>
Triangle indices, referring to offsets in the positions
and normals
vectors.
stride_to_index: Vec<u32>
Used to map back from pixel stride to vertex index.
Implementations§
Trait Implementations§
Source§impl Default for HeightMeshBuffer
impl Default for HeightMeshBuffer
Source§fn default() -> HeightMeshBuffer
fn default() -> HeightMeshBuffer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HeightMeshBuffer
impl RefUnwindSafe for HeightMeshBuffer
impl Send for HeightMeshBuffer
impl Sync for HeightMeshBuffer
impl Unpin for HeightMeshBuffer
impl UnwindSafe for HeightMeshBuffer
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