[−][src]Struct c2::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]
fn gjk<'a, T: Shape>(&'a self, other: &'a T) -> GjkRunner<'a, Self, T> where
Self: Sized,
T: Sized,
[src]
Self: Sized,
T: Sized,
fn time_of_impact<'a, T: Shape>(
&'a self,
other: &'a T
) -> ToiRunner<'a, Self, T> where
Self: Sized,
T: Sized,
[src]
&'a self,
other: &'a T
) -> ToiRunner<'a, Self, T> where
Self: Sized,
T: Sized,
impl BasicShape for Poly
[src]
fn collides_with<T: Shape>(&self, other: &T) -> bool
[src]
fn manifold<T: Shape>(&self, other: &T) -> Manifold
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,