Struct nom_stl::Triangle[][src]

pub struct Triangle { /* fields omitted */ }

A triangle type with an included normal vertex and vertices.

Implementations

impl Triangle[src]

pub fn new(normal: [f32; 3], vertices: [[f32; 3]; 3]) -> Self[src]

Create a new triangle.

pub fn normal(&self) -> [f32; 3][src]

Return the normal vertex of the triangle. This indicates the “front” of the triangle.

pub fn vertices(&self) -> [[f32; 3]; 3][src]

Return an array of the triangle’s corner vertices

pub fn size_of(&self) -> usize[src]

The size of the Triangle struct at runtime.

Trait Implementations

impl Clone for Triangle[src]

impl Copy for Triangle[src]

impl Debug for Triangle[src]

impl PartialEq<Triangle> for Triangle[src]

impl StructuralPartialEq for Triangle[src]

Auto Trait Implementations

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.