pub struct ConvexPolygon<S> {
pub vertices: Vec<Point2<S>>,
}
Expand description
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.
Implementations§
Trait Implementations§
Source§impl<S: Clone> Clone for ConvexPolygon<S>
impl<S: Clone> Clone for ConvexPolygon<S>
Source§fn clone(&self) -> ConvexPolygon<S>
fn clone(&self) -> ConvexPolygon<S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S> ComputeBound<Aabb2<S>> for ConvexPolygon<S>where
S: BaseFloat,
impl<S> ComputeBound<Aabb2<S>> for ConvexPolygon<S>where
S: BaseFloat,
Source§fn compute_bound(&self) -> Aabb2<S>
fn compute_bound(&self) -> Aabb2<S>
Compute the bounding volume
Source§impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S>where
S: BaseFloat,
impl<S> Continuous<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S>where
S: BaseFloat,
Source§impl<S: Debug> Debug for ConvexPolygon<S>
impl<S: Debug> Debug for ConvexPolygon<S>
Source§impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S>where
S: BaseFloat,
impl<S> Discrete<Ray<S, Point2<S>, Vector2<S>>> for ConvexPolygon<S>where
S: BaseFloat,
Source§fn intersects(&self, ray: &Ray2<S>) -> bool
fn intersects(&self, ray: &Ray2<S>) -> bool
Ray must be in object space
Source§impl<S> From<ConvexPolygon<S>> for Primitive2<S>
impl<S> From<ConvexPolygon<S>> for Primitive2<S>
Source§fn from(polygon: ConvexPolygon<S>) -> Primitive2<S>
fn from(polygon: ConvexPolygon<S>) -> Primitive2<S>
Converts to this type from the input type.
Source§impl<S: PartialEq> PartialEq for ConvexPolygon<S>
impl<S: PartialEq> PartialEq for ConvexPolygon<S>
Source§impl<S> Primitive for ConvexPolygon<S>where
S: BaseFloat,
impl<S> Primitive for ConvexPolygon<S>where
S: BaseFloat,
impl<S> StructuralPartialEq for ConvexPolygon<S>
Auto Trait Implementations§
impl<S> Freeze for ConvexPolygon<S>
impl<S> RefUnwindSafe for ConvexPolygon<S>where
S: RefUnwindSafe,
impl<S> Send for ConvexPolygon<S>where
S: Send,
impl<S> Sync for ConvexPolygon<S>where
S: Sync,
impl<S> Unpin for ConvexPolygon<S>where
S: Unpin,
impl<S> UnwindSafe for ConvexPolygon<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more