[−][src]Struct wavefront::Vertex
A vertex defined in an OBJ.
Implementations
impl<'a> Vertex<'a>
[src]
pub fn position_index(&self) -> Index
[src]
Returns the index of the vertex's position in the slice given by Obj::positions
.
Note that, unlike OBJ files themselves, this is zero-indexed.
pub fn position(&self) -> [f32; 3]
[src]
Returns the position of this vertex.
pub fn uv_index(&self) -> Option<Index>
[src]
Returns the index of the vertex's texture coordinate, if it has one, in the slice given by Obj::uvs
.
Note that, unlike OBJ files themselves, this is zero-indexed.
pub fn uv(&self) -> Option<[f32; 3]>
[src]
Returns the texture coordinate of this vertex, if it has one.
pub fn normal_index(&self) -> Option<Index>
[src]
Returns the index of the vertex's normal, if it has one, in the slice given by Obj::normals
.
Note that, unlike OBJ files themselves, this is zero-indexed.
pub fn normal(&self) -> Option<[f32; 3]>
[src]
Returns the normal of this vertex, if it has one.
Trait Implementations
impl<'a> Clone for Vertex<'a>
[src]
impl<'a> Copy for Vertex<'a>
[src]
impl<'a> Debug for Vertex<'a>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,