#[repr(C)]pub struct TerrainVertex {
pub pos: [i16; 4],
pub uv: [i16; 2],
pub normal: [u8; 4],
}Expand description
One vertex of the terrain mesh, 16 bytes, as the terrain shader reads it.
Fields§
§pos: [i16; 4]x, y (cells from the centre of the terrain), the height (the saved value, height ×
256), and 0xff.
uv: [i16; 2]The position on the map × 16384, to sample the surface image.
normal: [u8; 4]The normal as bytes, (n + 1) × 127.5, and a zero byte.
Trait Implementations§
Source§impl Clone for TerrainVertex
impl Clone for TerrainVertex
Source§fn clone(&self) -> TerrainVertex
fn clone(&self) -> TerrainVertex
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 moreimpl Copy for TerrainVertex
Source§impl Debug for TerrainVertex
impl Debug for TerrainVertex
Source§impl Default for TerrainVertex
impl Default for TerrainVertex
Source§fn default() -> TerrainVertex
fn default() -> TerrainVertex
Returns the “default value” for a type. Read more
impl Eq for TerrainVertex
Source§impl PartialEq for TerrainVertex
impl PartialEq for TerrainVertex
impl StructuralPartialEq for TerrainVertex
Auto Trait Implementations§
impl Freeze for TerrainVertex
impl RefUnwindSafe for TerrainVertex
impl Send for TerrainVertex
impl Sync for TerrainVertex
impl Unpin for TerrainVertex
impl UnsafeUnpin for TerrainVertex
impl UnwindSafe for TerrainVertex
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