pub struct Mesh {
pub vertices: Vec<Vertex>,
pub indices: Vec<u32>,
pub aabb: Aabb,
}Fields§
§vertices: Vec<Vertex>§indices: Vec<u32>§aabb: AabbImplementations§
Source§impl Mesh
impl Mesh
pub fn new(vertices: Vec<Vertex>, indices: Vec<u32>) -> Self
pub fn triangle_count(&self) -> usize
Sourcepub fn compute_normals(&mut self)
pub fn compute_normals(&mut self)
Recompute smooth normals from triangle face normals.
Sourcepub fn compute_tangents(&mut self)
pub fn compute_tangents(&mut self)
Compute tangents for normal mapping (requires UVs).
Trait Implementations§
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