Struct rhusics_core::collide2d::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]

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

Trait Implementations

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

Compute the bounding volume

impl<S> Clone for ConvexPolygon<S> where
    S: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

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

Point type

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

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

Performs the conversion.

impl<S> Serialize for ConvexPolygon<S> where
    S: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, S> Deserialize<'de> for ConvexPolygon<S> where
    S: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
    S: BaseFloat
[src]

Ray must be in object space

impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
    S: BaseFloat
[src]

Result returned by the intersection test

Ray must be in object space

impl<S> PartialEq<ConvexPolygon<S>> for ConvexPolygon<S> where
    S: PartialEq<S>, 
[src]

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

This method tests for !=.

impl<S> Volume<S, S> for ConvexPolygon<S> where
    S: BaseFloat + Inertia
[src]

Compute the mass of the shape based on its material

Auto Trait Implementations

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

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