#[repr(C)]pub struct MeshUniforms {Show 14 fields
pub model_matrix: [[f32; 4]; 4],
pub shade_style: u32,
pub show_edges: u32,
pub edge_width: f32,
pub transparency: f32,
pub surface_color: [f32; 4],
pub edge_color: [f32; 4],
pub backface_policy: u32,
pub slice_planes_enabled: u32,
pub use_vertex_color: u32,
pub _pad1: f32,
pub _pad2: [f32; 3],
pub _pad3: f32,
pub backface_color: [f32; 4],
}Expand description
Uniforms for surface mesh rendering.
Note: Layout must match WGSL MeshUniforms exactly.
WGSL vec3<f32> has 16-byte alignment, requiring extra padding.
Fields§
§model_matrix: [[f32; 4]; 4]Model transform matrix (must be first for alignment)
shade_style: u32Shading style: 0 = smooth, 1 = flat, 2 = tri-flat
show_edges: u32Show edges: 0 = off, 1 = on
edge_width: f32Edge width in pixels
transparency: f32Surface transparency (0.0 = opaque, 1.0 = fully transparent)
surface_color: [f32; 4]Surface color (RGBA)
edge_color: [f32; 4]Edge color (RGBA)
backface_policy: u32Backface policy: 0 = identical, 1 = different, 2 = custom, 3 = cull
slice_planes_enabled: u32Slice plane clipping enable: 0 = off, 1 = on
use_vertex_color: u32Use per-vertex colors (1) or surface color (0)
_pad1: f32Padding to align to 16 bytes
_pad2: [f32; 3]Padding matching WGSL layout (12 bytes)
_pad3: f32Padding to align vec4 to 16 bytes
backface_color: [f32; 4]Backface color (RGBA), used when backface_policy is custom
Trait Implementations§
Source§impl Clone for MeshUniforms
impl Clone for MeshUniforms
Source§fn clone(&self) -> MeshUniforms
fn clone(&self) -> MeshUniforms
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MeshUniforms
impl Debug for MeshUniforms
Source§impl Default for MeshUniforms
impl Default for MeshUniforms
impl Copy for MeshUniforms
impl Pod for MeshUniforms
Auto Trait Implementations§
impl Freeze for MeshUniforms
impl RefUnwindSafe for MeshUniforms
impl Send for MeshUniforms
impl Sync for MeshUniforms
impl Unpin for MeshUniforms
impl UnsafeUnpin for MeshUniforms
impl UnwindSafe for MeshUniforms
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().