Struct obj::Vertex [] [src]

pub struct Vertex {
    pub position: [f32; 3],
    pub normal: [f32; 3],
}

Vertex data type of Obj which contains position and normal data of a vertex.

Fields

position: [f32; 3]

Position vector of a vertex.

normal: [f32; 3]

Normal vertor of a vertex.

Trait Implementations

impl Decodable for Vertex
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Vertex, __D::Error>

impl Encodable for Vertex
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Debug for Vertex
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for Vertex
[src]

fn clone(&self) -> Vertex

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl PartialEq for Vertex
[src]

fn eq(&self, __arg_0: &Vertex) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Vertex) -> bool

This method tests for !=.

impl Copy for Vertex
[src]

impl FromRawVertex for Vertex
[src]

fn process(positions: Vec<(f32, f32, f32, f32)>, normals: Vec<(f32, f32, f32)>, polygons: Vec<Polygon>) -> ObjResult<(Vec<Self>, Vec<u16>)>

Build vertex and index buffer from raw object data.