Struct plexus::primitive::UnboundedPolygon
source · [−]pub struct UnboundedPolygon<G>(_);
Expand description
Unbounded polymorphic $n$-gon.
UnboundedPolygon
represents an $n$-gon with three or more edges. Unlike
BoundedPolygon
, there is no limit to the arity of polygons that
UnboundedPolygon
may represent.
It is not possible to trivially convert an UnboundedPolygon
into other
topological types like NGon
. See the module documentation
for more information.
Implementations
sourceimpl<G> UnboundedPolygon<G>
impl<G> UnboundedPolygon<G>
pub fn trigon(a: G, b: G, c: G) -> Self
pub fn tetragon(a: G, b: G, c: G, d: G) -> Self
pub fn positions(&self) -> UnboundedPolygon<&Position<G>> where
G: AsPosition,
sourceimpl<'a, G> UnboundedPolygon<&'a G> where
G: Clone,
impl<'a, G> UnboundedPolygon<&'a G> where
G: Clone,
pub fn cloned(self) -> UnboundedPolygon<G>
Trait Implementations
sourceimpl<G> Adjunct for UnboundedPolygon<G>
impl<G> Adjunct for UnboundedPolygon<G>
type Item = G
sourceimpl<G> AsMut<[G]> for UnboundedPolygon<G>
impl<G> AsMut<[G]> for UnboundedPolygon<G>
sourceimpl<G> AsRef<[G]> for UnboundedPolygon<G>
impl<G> AsRef<[G]> for UnboundedPolygon<G>
sourceimpl<G: Clone> Clone for UnboundedPolygon<G>
impl<G: Clone> Clone for UnboundedPolygon<G>
sourcefn clone(&self) -> UnboundedPolygon<G>
fn clone(&self) -> UnboundedPolygon<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 UnboundedPolygon<G>
impl<G: Debug> Debug for UnboundedPolygon<G>
sourceimpl<G> DynamicArity for UnboundedPolygon<G>
impl<G> DynamicArity for UnboundedPolygon<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, const N: usize> From<NGon<G, N>> for UnboundedPolygon<G> where
Constant<N>: ToType,
TypeOf<N>: Cmp<U2, Output = Greater>,
G: Clone,
impl<G, const N: usize> From<NGon<G, N>> for UnboundedPolygon<G> where
Constant<N>: ToType,
TypeOf<N>: Cmp<U2, Output = Greater>,
G: Clone,
sourceimpl<G> FromItems for UnboundedPolygon<G>
impl<G> FromItems for UnboundedPolygon<G>
fn from_items<I>(items: I) -> Option<Self> where
I: IntoIterator<Item = Self::Item>,
sourceimpl<G> Index<usize> for UnboundedPolygon<G>
impl<G> Index<usize> for UnboundedPolygon<G>
sourceimpl<G> IndexMut<usize> for UnboundedPolygon<G>
impl<G> IndexMut<usize> for UnboundedPolygon<G>
sourceimpl<T> IntoEdges for UnboundedPolygon<T> where
T: Clone,
impl<T> IntoEdges for UnboundedPolygon<T> where
T: Clone,
type Output = Vec<NGon<<UnboundedPolygon<T> as Topological>::Vertex, 2_usize>, Global>
fn into_edges(self) -> Self::Output
sourceimpl<G> IntoItems for UnboundedPolygon<G>
impl<G> IntoItems for UnboundedPolygon<G>
sourceimpl<G> IntoIterator for UnboundedPolygon<G>
impl<G> IntoIterator for UnboundedPolygon<G>
sourceimpl<T, U> Map<U> for UnboundedPolygon<T>
impl<T, U> Map<U> for UnboundedPolygon<T>
sourceimpl<G: PartialEq> PartialEq<UnboundedPolygon<G>> for UnboundedPolygon<G>
impl<G: PartialEq> PartialEq<UnboundedPolygon<G>> for UnboundedPolygon<G>
sourcefn eq(&self, other: &UnboundedPolygon<G>) -> bool
fn eq(&self, other: &UnboundedPolygon<G>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UnboundedPolygon<G>) -> bool
fn ne(&self, other: &UnboundedPolygon<G>) -> bool
This method tests for !=
.
sourceimpl<G> Polygonal for UnboundedPolygon<G>
impl<G> Polygonal for UnboundedPolygon<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 UnboundedPolygon<G>
impl<G> StaticArity for UnboundedPolygon<G>
sourceimpl<G> Topological for UnboundedPolygon<G>
impl<G> Topological for UnboundedPolygon<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>>
sourceimpl<G> TryFromIterator<G> for UnboundedPolygon<G>
impl<G> TryFromIterator<G> for UnboundedPolygon<G>
impl<G> StructuralPartialEq for UnboundedPolygon<G>
Auto Trait Implementations
impl<G> RefUnwindSafe for UnboundedPolygon<G> where
G: RefUnwindSafe,
impl<G> Send for UnboundedPolygon<G> where
G: Send,
impl<G> Sync for UnboundedPolygon<G> where
G: Sync,
impl<G> Unpin for UnboundedPolygon<G> where
G: Unpin,
impl<G> UnwindSafe for UnboundedPolygon<G> where
G: UnwindSafe + RefUnwindSafe,
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.