pub struct Mesh {
pub positions: Vec<Point>,
pub indices: Vec<u32>,
}Expand description
A snapshot of triangle geometry, ready to hand to a renderer.
Positions and indices are copied out of Ink rather than borrowed, because
Ink rebuilds its meshes in place as a stroke grows and any borrow would be
invalidated by the next call to
InProgressStroke::update_shape.
Fields§
§positions: Vec<Point>Vertex positions, one per vertex.
indices: Vec<u32>Triangle vertex indices, three per triangle, indexing into positions.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Mesh
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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