Enum plexus::primitive::BoundedPolygon
source · [−]Expand description
Bounded polymorphic $n$-gon.
BoundedPolygon
represents an $n$-gon with at least three edges by
enumerating NGon
s. As such, $n$ is bounded, because the enumeration only
supports a limited set of polygons. Only common arities used by generators
are provided.
See the module documentation for more information.
Variants
N3(Trigon<G>)
N4(Tetragon<G>)
Trait Implementations
sourceimpl<G> Adjunct for BoundedPolygon<G>
impl<G> Adjunct for BoundedPolygon<G>
type Item = G
sourceimpl<G> AsMut<[G]> for BoundedPolygon<G>
impl<G> AsMut<[G]> for BoundedPolygon<G>
sourceimpl<G> AsRef<[G]> for BoundedPolygon<G>
impl<G> AsRef<[G]> for BoundedPolygon<G>
sourceimpl<G: Clone> Clone for BoundedPolygon<G>
impl<G: Clone> Clone for BoundedPolygon<G>
sourcefn clone(&self) -> BoundedPolygon<G>
fn clone(&self) -> BoundedPolygon<G>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<G: Debug> Debug for BoundedPolygon<G>
impl<G: Debug> Debug for BoundedPolygon<G>
sourceimpl<G> DynamicArity for BoundedPolygon<G>
impl<G> DynamicArity for BoundedPolygon<G>
sourceimpl<G> Fold for BoundedPolygon<G>
impl<G> Fold for BoundedPolygon<G>
fn fold<U, F>(self, seed: U, f: F) -> U where
F: FnMut(U, Self::Item) -> U,
fn sum(self) -> Self::Item where
Self::Item: Add<Self::Item>,
Self::Item: Zero,
<Self::Item as Add<Self::Item>>::Output == Self::Item,
fn product(self) -> Self::Item where
Self::Item: Mul<Self::Item>,
Self::Item: One,
<Self::Item as Mul<Self::Item>>::Output == Self::Item,
fn min_or_undefined(self) -> Self::Item where
Self::Item: Bounded,
Self::Item: IntrinsicOrd,
fn max_or_undefined(self) -> Self::Item where
Self::Item: Bounded,
Self::Item: IntrinsicOrd,
fn any<F>(self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
fn all<F>(self, f: F) -> bool where
F: FnMut(Self::Item) -> bool,
sourceimpl<G> From<[G; 3]> for BoundedPolygon<G>
impl<G> From<[G; 3]> for BoundedPolygon<G>
sourceimpl<G> From<[G; 4]> for BoundedPolygon<G>
impl<G> From<[G; 4]> for BoundedPolygon<G>
sourceimpl<G> From<BoundedPolygon<G>> for UnboundedPolygon<G> where
G: Clone,
impl<G> From<BoundedPolygon<G>> for UnboundedPolygon<G> where
G: Clone,
sourcefn from(polygon: BoundedPolygon<G>) -> Self
fn from(polygon: BoundedPolygon<G>) -> Self
Converts to this type from the input type.
sourceimpl<G> From<NGon<G, 3_usize>> for BoundedPolygon<G>
impl<G> From<NGon<G, 3_usize>> for BoundedPolygon<G>
sourceimpl<G> From<NGon<G, 4_usize>> for BoundedPolygon<G>
impl<G> From<NGon<G, 4_usize>> for BoundedPolygon<G>
sourceimpl<G> Index<usize> for BoundedPolygon<G>
impl<G> Index<usize> for BoundedPolygon<G>
sourceimpl<G> IndexMut<usize> for BoundedPolygon<G>
impl<G> IndexMut<usize> for BoundedPolygon<G>
sourceimpl<T> IntoEdges for BoundedPolygon<T> where
T: Clone,
impl<T> IntoEdges for BoundedPolygon<T> where
T: Clone,
type Output = Vec<NGon<<BoundedPolygon<T> as Topological>::Vertex, 2_usize>, Global>
fn into_edges(self) -> Self::Output
sourceimpl<G> IntoItems for BoundedPolygon<G>
impl<G> IntoItems for BoundedPolygon<G>
sourceimpl<G> IntoIterator for BoundedPolygon<G>
impl<G> IntoIterator for BoundedPolygon<G>
sourceimpl<T> IntoSubdivisions for BoundedPolygon<T> where
T: Clone + Interpolate<Output = T>,
impl<T> IntoSubdivisions for BoundedPolygon<T> where
T: Clone + Interpolate<Output = T>,
type Output = Vec<BoundedPolygon<T>, Global>
fn into_subdivisions(self) -> Self::Output
sourceimpl<T> IntoTrigons for BoundedPolygon<T> where
T: Clone,
impl<T> IntoTrigons for BoundedPolygon<T> where
T: Clone,
type Output = Vec<NGon<<BoundedPolygon<T> as Topological>::Vertex, 3_usize>, Global>
fn into_trigons(self) -> Self::Output
sourceimpl<T, U> Map<U> for BoundedPolygon<T>
impl<T, U> Map<U> for BoundedPolygon<T>
sourceimpl<G: PartialEq> PartialEq<BoundedPolygon<G>> for BoundedPolygon<G>
impl<G: PartialEq> PartialEq<BoundedPolygon<G>> for BoundedPolygon<G>
sourcefn eq(&self, other: &BoundedPolygon<G>) -> bool
fn eq(&self, other: &BoundedPolygon<G>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BoundedPolygon<G>) -> bool
fn ne(&self, other: &BoundedPolygon<G>) -> bool
This method tests for !=
.
sourceimpl<G> Polygonal for BoundedPolygon<G>
impl<G> Polygonal for BoundedPolygon<G>
sourcefn is_convex(&self) -> bool where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U2>,
fn is_convex(&self) -> bool where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U2>,
Determines if the polygon is convex. Read more
sourceimpl<G> StaticArity for BoundedPolygon<G>
impl<G> StaticArity for BoundedPolygon<G>
sourceimpl<G> Topological for BoundedPolygon<G>
impl<G> Topological for BoundedPolygon<G>
type Vertex = G
fn try_from_slice<I>(vertices: I) -> Option<Self> where
Self::Vertex: Copy,
I: AsRef<[Self::Vertex]>,
sourcefn embed_into_e3_xy<P>(ngon: P, z: Scalar<Self::Vertex>) -> Self where
Self::Vertex: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Self::Vertex>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Self::Vertex>>,
fn embed_into_e3_xy<P>(ngon: P, z: Scalar<Self::Vertex>) -> Self where
Self::Vertex: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Self::Vertex>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Self::Vertex>>,
Embeds an $n$-gon from $\Reals^2$ into $\Reals^3$. Read more
fn embed_into_e3_xy_with<P, F>(
ngon: P,
z: Scalar<Position<Self::Vertex>>,
f: F
) -> Self where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Position<Self::Vertex>>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Position<Self::Vertex>>>,
F: FnMut(Position<Self::Vertex>) -> Self::Vertex,
sourcefn embed_into_e3_plane<P>(ngon: P, plane: Plane<Self::Vertex>) -> Self where
Self::Vertex: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Self::Vertex>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Self::Vertex>>,
fn embed_into_e3_plane<P>(ngon: P, plane: Plane<Self::Vertex>) -> Self where
Self::Vertex: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Self::Vertex>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Self::Vertex>>,
Embeds an $n$-gon from $\Reals^2$ into $\Reals^3$. Read more
fn embed_into_e3_plane_with<P, F>(
ngon: P,
_: Plane<Position<Self::Vertex>>,
f: F
) -> Self where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U3>,
P: Map<Self::Vertex, Output = Self> + Topological,
P::Vertex: EuclideanSpace + FiniteDimensional<N = U2> + Extend<Position<Self::Vertex>>,
Vector<P::Vertex>: VectorSpace<Scalar = Scalar<Position<Self::Vertex>>>,
F: FnMut(Position<Self::Vertex>) -> Self::Vertex,
sourcefn project_into_plane(self, plane: Plane<Position<Self::Vertex>>) -> Self where
Self::Vertex: AsPositionMut,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional,
<Position<Self::Vertex> as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
fn project_into_plane(self, plane: Plane<Position<Self::Vertex>>) -> Self where
Self::Vertex: AsPositionMut,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional,
<Position<Self::Vertex> as FiniteDimensional>::N: Cmp<U2, Output = Greater>,
Projects an $n$-gon into a plane. Read more
fn edges(&self) -> Vec<Edge<&Self::Vertex>>
impl<G: Copy> Copy for BoundedPolygon<G>
impl<G> StructuralPartialEq for BoundedPolygon<G>
Auto Trait Implementations
impl<G> RefUnwindSafe for BoundedPolygon<G> where
G: RefUnwindSafe,
impl<G> Send for BoundedPolygon<G> where
G: Send,
impl<G> Sync for BoundedPolygon<G> where
G: Sync,
impl<G> Unpin for BoundedPolygon<G> where
G: Unpin,
impl<G> UnwindSafe for BoundedPolygon<G> where
G: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromGeometry<T> for T
impl<T> FromGeometry<T> for T
fn from_geometry(other: T) -> T
sourceimpl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
impl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
fn into_geometry(self) -> U
sourceimpl<N, P, Q> IntoIndexed<N> for P where
P: Map<(N, <P as Topological>::Vertex), Output = Q> + Polygonal,
Q: Polygonal<Vertex = (N, <P as Topological>::Vertex)>,
N: Copy + Integer + Unsigned,
impl<N, P, Q> IntoIndexed<N> for P where
P: Map<(N, <P as Topological>::Vertex), Output = Q> + Polygonal,
Q: Polygonal<Vertex = (N, <P as Topological>::Vertex)>,
N: Copy + Integer + Unsigned,
type Indexed = Q
fn into_indexed(self) -> <P as IntoIndexed<N>>::Indexed
sourceimpl<T> IntoVertices for T where
T: Topological,
impl<T> IntoVertices for T where
T: Topological,
type Output = <T as IntoIterator>::IntoIter
fn into_vertices(self) -> <T as IntoVertices>::Output
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
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.