[][src]Struct wavefront::Vertex

pub struct Vertex<'a> { /* fields omitted */ }

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 Buffers::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 Buffers::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 Buffers::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>[src]

impl<'a> Send for Vertex<'a>[src]

impl<'a> Sync for Vertex<'a>[src]

impl<'a> Unpin for Vertex<'a>[src]

impl<'a> UnwindSafe for Vertex<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.