Struct rgeometry::data::PolygonConvex [−][src]
pub struct PolygonConvex<T>(_);
Implementations
$O(1)$ Assume that a polygon is convex.
Safety
The input polygon has to be strictly convex, ie. no vertices are allowed to be concave or colinear.
$O(\log n)$
pub fn normalize(&self) -> PolygonConvex<BigRational> where
T: PolygonScalar + Into<BigInt>,
T::ExtendedSigned: Into<BigInt>,
impl<T> PolygonConvex<T> where
T: Bounded + PolygonScalar + SampleUniform + Copy + Into<BigInt>,
impl<T> PolygonConvex<T> where
T: Bounded + PolygonScalar + SampleUniform + Copy + Into<BigInt>,
Methods from Deref<Target = Polygon<T>>
pub fn normalize(&self) -> Polygon<BigRational> where
T: PolygonScalar + Into<BigInt>,
T::ExtendedSigned: Into<BigInt>,
pub fn signed_area<F>(&self) -> F where
T: PolygonScalar + Into<F>,
F: NumOps<F, F> + Sum + FromPrimitive,
pub fn iter_boundary(&self) -> CursorIter<'_, T>ⓘNotable traits for CursorIter<'a, T>
impl<'a, T> Iterator for CursorIter<'a, T> type Item = Cursor<'a, T>;
pub fn iter_boundary_edges(&self) -> EdgeIter<'_, T>ⓘ
Panics if the edge isn’t part of the polygon.
Trait Implementations
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<T> RefUnwindSafe for PolygonConvex<T> where
T: RefUnwindSafe,
impl<T> Send for PolygonConvex<T> where
T: Send,
impl<T> Sync for PolygonConvex<T> where
T: Sync,
impl<T> Unpin for PolygonConvex<T> where
T: Unpin,
impl<T> UnwindSafe for PolygonConvex<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V