[][src]Enum collision::primitive::Primitive2

pub enum Primitive2<S> {
    Particle(Particle2<S>),
    Line(Line2<S>),
    Circle(Circle<S>),
    Rectangle(Rectangle<S>),
    Square(Square<S>),
    ConvexPolygon(ConvexPolygon<S>),
}

Wrapper enum for 2D primitives, that also implements the Primitive trait, making it easier to use many different primitives in algorithms.

Variants

Particle(Particle2<S>)

Particle

Line(Line2<S>)

Line

Circle(Circle<S>)

Circle

Rectangle(Rectangle<S>)

Rectangle

Square(Square<S>)

Square

ConvexPolygon(ConvexPolygon<S>)

Convex polygon with any number of vertices.

Trait Implementations

impl<S> ComputeBound<Aabb2<S>> for Primitive2<S> where
    S: BaseFloat
[src]

impl<S> Primitive for Primitive2<S> where
    S: BaseFloat
[src]

type Point = Point2<S>

Point type

impl<S> DiscreteTransformed<Ray<S, Point2<S>, Vector2<S>>> for Primitive2<S> where
    S: BaseFloat
[src]

type Point = Point2<S>

Point type for transformation of self

impl<S> ContinuousTransformed<Ray<S, Point2<S>, Vector2<S>>> for Primitive2<S> where
    S: BaseFloat
[src]

type Point = Point2<S>

Point type for transformation of self

type Result = Point2<S>

Result of intersection test

impl<S: Clone> Clone for Primitive2<S>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: PartialEq> PartialEq<Primitive2<S>> for Primitive2<S>[src]

impl<S> From<Particle<Point2<S>>> for Primitive2<S>[src]

impl<S> From<Line<S, Vector2<S>, Point2<S>>> for Primitive2<S>[src]

impl<S> From<Circle<S>> for Primitive2<S>[src]

impl<S> From<Rectangle<S>> for Primitive2<S>[src]

impl<S> From<Square<S>> for Primitive2<S>[src]

impl<S> From<ConvexPolygon<S>> for Primitive2<S>[src]

impl<S: Debug> Debug for Primitive2<S>[src]

Auto Trait Implementations

impl<S> Send for Primitive2<S> where
    S: Send

impl<S> Sync for Primitive2<S> where
    S: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]