pub struct TextMesh {
pub vertices: Vec<TextVertex>,
pub indices: Vec<u32>,
}Expand description
A textured triangle mesh.
Fields§
§vertices: Vec<TextVertex>The vertices.
indices: Vec<u32>The triangle indices.
Implementations§
Source§impl TextMesh
Inherent implementation of TextMesh.
impl TextMesh
Inherent implementation of TextMesh.
Sourcepub fn push_quad(
&mut self,
corners: [(f32, f32); 4],
uvs: [(f32, f32); 4],
color: u32,
)
pub fn push_quad( &mut self, corners: [(f32, f32); 4], uvs: [(f32, f32); 4], color: u32, )
Appends a textured quad.
The corners are given in order — top left, top right, bottom right, bottom left — and so are the texture coordinates that go with them.
§Arguments
[(f32, f32); 4]- A[(f32, f32); 4]parameter.u32- A 32-bit unsigned integer (u32).
Source§impl TextMesh
impl TextMesh
pub fn get_vertices(&self) -> &Vec<TextVertex>
pub fn get_mut_vertices(&mut self) -> &mut Vec<TextVertex>
pub fn set_vertices(&mut self, val: Vec<TextVertex>) -> &mut Self
pub fn get_indices(&self) -> &Vec<u32>
pub fn get_mut_indices(&mut self) -> &mut Vec<u32>
pub fn set_indices(&mut self, val: Vec<u32>) -> &mut Self
Trait Implementations§
impl StructuralPartialEq for TextMesh
Auto Trait Implementations§
impl Freeze for TextMesh
impl RefUnwindSafe for TextMesh
impl Send for TextMesh
impl Sync for TextMesh
impl Unpin for TextMesh
impl UnsafeUnpin for TextMesh
impl UnwindSafe for TextMesh
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