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

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

Line

Circle

Rectangle

Square

Convex polygon with any number of vertices.

Trait Implementations

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

[src]

Formats the value using the given formatter. Read more

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Compute the bounding volume

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

Point type

[src]

Get the support point on the shape in a given direction. Read more

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

Point type for transformation of self

[src]

Intersection test for transformed self

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

Point type for transformation of self

Result of intersection test

[src]

Intersection test for transformed self

Auto Trait Implementations

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

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