Struct evegfx::graphics::Vertex2D[][src]

pub struct Vertex2D<S: CoordinateSystem> { /* fields omitted */ }

Represents 2D coordinates in a specific coordinate system.

Most functions that expect vertices as arguments are generic over all types that can convert to Vertex2D. When it's obvious from context that such an argument is a vertex, it's conventional to represent it as a bare tuple of X and Y coordinates, (x, y), to avoid the visual noise of explicitly calling the Vertex2D constructor function.

Implementations

impl<S: CoordinateSystem> Vertex2D<S>[src]

pub fn new(x: S::Dim, y: S::Dim) -> Self[src]

pub fn coords(&self) -> (S::Dim, S::Dim)[src]

Trait Implementations

impl<S: Clone + CoordinateSystem> Clone for Vertex2D<S> where
    S::Dim: Clone,
    S::Dim: Clone
[src]

impl<S: Copy + CoordinateSystem> Copy for Vertex2D<S> where
    S::Dim: Copy,
    S::Dim: Copy
[src]

impl<S: Debug + CoordinateSystem> Debug for Vertex2D<S> where
    S::Dim: Debug,
    S::Dim: Debug
[src]

impl<S: Eq + CoordinateSystem> Eq for Vertex2D<S> where
    S::Dim: Eq,
    S::Dim: Eq
[src]

impl<S: CoordinateSystem> From<(<S as CoordinateSystem>::Dim, <S as CoordinateSystem>::Dim)> for Vertex2D<S>[src]

impl<S: PartialEq + CoordinateSystem> PartialEq<Vertex2D<S>> for Vertex2D<S> where
    S::Dim: PartialEq,
    S::Dim: PartialEq
[src]

impl<S: CoordinateSystem> StructuralEq for Vertex2D<S>[src]

impl<S: CoordinateSystem> StructuralPartialEq for Vertex2D<S>[src]

Auto Trait Implementations

impl<S> Send for Vertex2D<S> where
    <S as CoordinateSystem>::Dim: Send
[src]

impl<S> Sync for Vertex2D<S> where
    <S as CoordinateSystem>::Dim: Sync
[src]

impl<S> Unpin for Vertex2D<S> where
    <S as CoordinateSystem>::Dim: Unpin
[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, 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.