pub struct MeshItem {
pub points: Vec<Vec3>,
pub triangle_indices: Vec<u32>,
pub transform: Mat4,
pub vertex_colors: Vec<Rgba>,
pub vertex_normals: Vec<Vec3>,
}Expand description
A primitive for rendering a mesh item.
Fields§
§points: Vec<Vec3>The vertices of the mesh
triangle_indices: Vec<u32>The triangle indices
transform: Mat4The transform matrix
vertex_colors: Vec<Rgba>Per-vertex colors
vertex_normals: Vec<Vec3>Per-vertex normals for smooth shading.
All-zero (or empty) → shader falls back to flat shading via dpdx/dpdy.
Trait Implementations§
Source§impl FillColor for MeshItem
impl FillColor for MeshItem
Source§fn fill_color(&self) -> AlphaColor<Srgb>
fn fill_color(&self) -> AlphaColor<Srgb>
Getting fill color of an item
Source§fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
Setting fill color(rgba) of an item
Source§fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
Setting fill opacity of an item
Source§impl Interpolatable for MeshItem
impl Interpolatable for MeshItem
impl StructuralPartialEq for MeshItem
Auto Trait Implementations§
impl Freeze for MeshItem
impl RefUnwindSafe for MeshItem
impl Send for MeshItem
impl Sync for MeshItem
impl Unpin for MeshItem
impl UnwindSafe for MeshItem
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
impl<T> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
Source§fn show(&self) -> AnimationCell<T>
fn show(&self) -> AnimationCell<T>
Show the item
Source§fn hide(&self) -> AnimationCell<T>
fn hide(&self) -> AnimationCell<T>
Hide the item