Struct fenris_geometry::Convex
source · #[repr(transparent)]pub struct Convex<T>(pub T);
Tuple Fields§
§0: T
Implementations§
source§impl<'a, T, D> Convex<&'a SimplePolygon<T, D>>where
T: Scalar,
D: DimName,
DefaultAllocator: Allocator<T, D>,
impl<'a, T, D> Convex<&'a SimplePolygon<T, D>>where
T: Scalar,
D: DimName,
DefaultAllocator: Allocator<T, D>,
sourcepub fn triangulate_at_point(&self, point: &OPoint<T, D>) -> Vec<Triangle<T, D>>
pub fn triangulate_at_point(&self, point: &OPoint<T, D>) -> Vec<Triangle<T, D>>
Triangulates the convex polygon by connecting the provided point with each edge.
sourcepub fn triangulate(&self) -> Vec<Triangle<T, D>>
pub fn triangulate(&self) -> Vec<Triangle<T, D>>
Triangulates the convex polygon by creating a triangle fan starting from its first vertex.
source§impl<T> Convex<T>
impl<T> Convex<T>
pub fn assume_convex(obj: T) -> Self
Trait Implementations§
source§impl<T: PartialEq> PartialEq<Convex<T>> for Convex<T>
impl<T: PartialEq> PartialEq<Convex<T>> for Convex<T>
impl<T: Copy> Copy for Convex<T>
impl<T: Eq> Eq for Convex<T>
impl<T> StructuralEq for Convex<T>
impl<T> StructuralPartialEq for Convex<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Convex<T>where
T: RefUnwindSafe,
impl<T> Send for Convex<T>where
T: Send,
impl<T> Sync for Convex<T>where
T: Sync,
impl<T> Unpin for Convex<T>where
T: Unpin,
impl<T> UnwindSafe for Convex<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.