[][src]Struct c2::Poly

pub struct Poly(_);

A polygon with up to 8 sides

Implementations

impl Poly[src]

pub fn from_slice<V: Copy + Into<Vec2>>(verts: &[V]) -> Poly[src]

Creates a polygon from a slice of vectors

pub fn from_array<V: Copy + Into<Vec2>>(count: usize, verts: [V; 8]) -> Poly[src]

Creates a polygon from an array

pub fn count(self) -> usize[src]

The number of sides

pub fn get_vert(self, index: usize) -> Vec2[src]

Gets the point of the polygon at the index

Trait Implementations

impl AdvancedShape for Poly[src]

impl BasicShape for Poly[src]

impl Clone for Poly[src]

impl Copy for Poly[src]

impl Debug for Poly[src]

impl Shape for Poly[src]

Auto Trait Implementations

impl RefUnwindSafe for Poly

impl Send for Poly

impl Sync for Poly

impl Unpin for Poly

impl UnwindSafe for Poly

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.