pub struct MeshBuffer {
pub anchor: Vec3,
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub indices: Vec<u32>,
}Expand description
A shared triangle mesh, from usd::usdgeom::mesh.
Fields§
§anchor: Vec3Local coordinates of the buffer’s zero: the centre of the mesh’s
local bounding box. A vertex’s local position is anchor + position.
positions: Vec<[f32; 3]>Vertex positions relative to anchor.
normals: Vec<[f32; 3]>One unit normal per vertex, area-weighted over its triangles.
indices: Vec<u32>Three indices per triangle, counter-clockwise front faces.
Implementations§
Source§impl MeshBuffer
impl MeshBuffer
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Number of triangles.
Trait Implementations§
Source§impl Clone for MeshBuffer
impl Clone for MeshBuffer
Source§fn clone(&self) -> MeshBuffer
fn clone(&self) -> MeshBuffer
Returns a copy 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 MeshBuffer
impl Debug for MeshBuffer
Source§impl PartialEq for MeshBuffer
impl PartialEq for MeshBuffer
impl StructuralPartialEq for MeshBuffer
Auto Trait Implementations§
impl Freeze for MeshBuffer
impl RefUnwindSafe for MeshBuffer
impl Send for MeshBuffer
impl Sync for MeshBuffer
impl Unpin for MeshBuffer
impl UnwindSafe for MeshBuffer
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