Struct parry2d::shape::ConvexPolygon[][src]

pub struct ConvexPolygon { /* fields omitted */ }

A 2D convex polygon.

Implementations

impl ConvexPolygon[src]

pub fn aabb(&self, pos: &Isometry<Real>) -> AABB[src]

Computes the world-space AABB of this convex polygon, transformed by pos.

pub fn local_aabb(&self) -> AABB[src]

Computes the local-space AABB of this convex polygon.

impl ConvexPolygon[src]

pub fn bounding_sphere(&self, pos: &Isometry<Real>) -> BoundingSphere[src]

Computes the world-space bounding sphere of this convex polygon, transformed by pos.

pub fn local_bounding_sphere(&self) -> BoundingSphere[src]

Computes the local-space bounding sphere of this convex polygon.

impl ConvexPolygon[src]

pub fn from_convex_hull(points: &[Point<Real>]) -> Option<Self>[src]

Creates a new 2D convex polygon from an arbitrary set of points.

This explicitly computes the convex hull of the given set of points. Use Returns None if the convex hull computation failed.

pub fn from_convex_polyline(points: Vec<Point<Real>>) -> Option<Self>[src]

Creates a new 2D convex polygon from a set of points assumed to describe a counter-clockwise convex polyline.

Convexity of the input polyline is not checked. Returns None if all points form an almost flat line.

pub fn points(&self) -> &[Point<Real>][src]

The vertices of this convex polygon.

pub fn normals(&self) -> &[Unit<Vector<Real>>][src]

The normals of the edges of this convex polygon.

pub fn support_feature_id_toward(
    &self,
    local_dir: &Unit<Vector<Real>>
) -> FeatureId
[src]

Get the ID of the feature with a normal that maximizes the dot product with local_dir.

Trait Implementations

impl Clone for ConvexPolygon[src]

impl Debug for ConvexPolygon[src]

impl PointQuery for ConvexPolygon[src]

impl PolygonalFeatureMap for ConvexPolygon[src]

impl RayCast for ConvexPolygon[src]

impl Shape for ConvexPolygon[src]

impl SupportMap for ConvexPolygon[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Az for T[src]

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

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

impl<T> CheckedAs for T[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

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

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatingAs for T[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]