Struct collision::primitive::ConvexPolygon [] [src]

pub struct ConvexPolygon<S> {
    pub vertices: Vec<Point2<S>>,
}

Convex polygon primitive.

Can contain any number of vertices, but a high number of vertices will affect performance of course. Vertices need to be in CCW order.

Fields

Vertices of the convex polygon.

Methods

impl<S> ConvexPolygon<S>
[src]

[src]

Create a new convex polygon from the given vertices. Vertices need to be in CCW order.

Trait Implementations

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

[src]

Formats the value using the given formatter.

impl<S: Clone> Clone for ConvexPolygon<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 ConvexPolygon<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> Primitive for ConvexPolygon<S> where
    S: BaseFloat
[src]

Point type

[src]

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

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

[src]

Compute the bounding volume

impl<S> Discrete<Ray2<S>> for ConvexPolygon<S> where
    S: BaseFloat
[src]

[src]

Ray must be in object space

impl<S> Continuous<Ray2<S>> for ConvexPolygon<S> where
    S: BaseFloat
[src]

Result returned by the intersection test

[src]

Ray must be in object space