pub struct Vertex<'a> { /* private fields */ }
Expand description
A vertex defined in an OBJ.
Implementations
sourceimpl<'a> Vertex<'a>
impl<'a> Vertex<'a>
sourcepub fn position_index(&self) -> Index
pub fn position_index(&self) -> Index
Returns the index of the vertex’s position in the slice given by Buffers::positions
.
Note that, unlike OBJ files themselves, this is zero-indexed.
sourcepub fn uv_index(&self) -> Option<Index>
pub fn uv_index(&self) -> Option<Index>
Returns the index of the vertex’s texture coordinate, if it has one, in the slice given by Buffers::uvs
.
Note that, unlike OBJ files themselves, this is zero-indexed.
sourcepub fn uv(&self) -> Option<[f32; 3]>
pub fn uv(&self) -> Option<[f32; 3]>
Returns the texture coordinate of this vertex, if it has one.
sourcepub fn normal_index(&self) -> Option<Index>
pub fn normal_index(&self) -> Option<Index>
Returns the index of the vertex’s normal, if it has one, in the slice given by Buffers::normals
.
Note that, unlike OBJ files themselves, this is zero-indexed.
Trait Implementations
impl<'a> Copy for Vertex<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Vertex<'a>
impl<'a> Send for Vertex<'a>
impl<'a> Sync for Vertex<'a>
impl<'a> Unpin for Vertex<'a>
impl<'a> UnwindSafe for Vertex<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more