[−][src]Struct collision::primitive::ConvexPolygon
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: Vec<Point2<S>>
Vertices of the convex polygon.
Methods
impl<S> ConvexPolygon<S>
[src]
impl<S> ConvexPolygon<S>
pub fn new(vertices: Vec<Point2<S>>) -> Self | [src] |
Create a new convex polygon from the given vertices. Vertices need to be in CCW order.
Trait Implementations
impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
S: BaseFloat,
[src]
impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
S: BaseFloat,
type Result = Point2<S>
Result returned by the intersection test
fn intersection(&self, ray: &Ray2<S>) -> Option<Point2<S>> | [src] |
Ray must be in object space
impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
S: BaseFloat,
[src]
impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S> where
S: BaseFloat,
fn intersects(&self, ray: &Ray2<S>) -> bool | [src] |
Ray must be in object space
impl<S> ComputeBound<Aabb2<S>> for ConvexPolygon<S> where
S: BaseFloat,
[src]
impl<S> ComputeBound<Aabb2<S>> for ConvexPolygon<S> where
S: BaseFloat,
fn compute_bound(&self) -> Aabb2<S> | [src] |
impl<S> Primitive for ConvexPolygon<S> where
S: BaseFloat,
[src]
impl<S> Primitive for ConvexPolygon<S> where
S: BaseFloat,
type Point = Point2<S>
Point type
fn support_point<T>(&self, direction: &Vector2<S>, transform: &T) -> Point2<S> where | [src] |
impl<S> From<ConvexPolygon<S>> for Primitive2<S>
[src]
impl<S> From<ConvexPolygon<S>> for Primitive2<S>
fn from(polygon: ConvexPolygon<S>) -> Primitive2<S> | [src] |
impl<S: Clone> Clone for ConvexPolygon<S>
[src]
impl<S: Clone> Clone for ConvexPolygon<S>
fn clone(&self) -> ConvexPolygon<S> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl<S: PartialEq> PartialEq<ConvexPolygon<S>> for ConvexPolygon<S>
[src]
impl<S: PartialEq> PartialEq<ConvexPolygon<S>> for ConvexPolygon<S>
fn eq(&self, other: &ConvexPolygon<S>) -> bool | [src] |
fn ne(&self, other: &ConvexPolygon<S>) -> bool | [src] |
impl<S: Debug> Debug for ConvexPolygon<S>
[src]
impl<S: Debug> Debug for ConvexPolygon<S>
Auto Trait Implementations
impl<S> Send for ConvexPolygon<S> where
S: Send,
impl<S> Send for ConvexPolygon<S> where
S: Send,
impl<S> Sync for ConvexPolygon<S> where
S: Sync,
impl<S> Sync for ConvexPolygon<S> where
S: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,