[][src]Struct plexus::primitive::NGon

pub struct NGon<A>(pub A)
where
    A: Array
;

$n$-gon with fixed arity.

NGon represents a polygonal structure as an array. Each array element represents vertex data in order with neighboring elements being connected by an implicit undirected edge. For example, an NGon with three vertices (NGon<[T; 3]>) would represent a triangle (trigon). Generally these elements are labeled $A$, $B$, $C$, etc.

NGons with less than three vertices are a degenerate case. An NGon with two vertices (NGon<[T; 2]>) is considered a monogon despite common definitions specifying a single vertex. Such an NGon is not considered a digon, as it represents a single undirected edge rather than two distinct (but collapsed) edges. Single-vertex NGons are unsupported. See the Edge type definition.

Polygons are defined in $\Reals^2$, but NGon supports arbitrary vertex data. This includes positional data in Euclidean spaces of arbitrary dimension. As such, NGon does not represent a pure polygon, but instead a superset defined solely by its topology. NGons in $\Reals^3$ are useful for representing polygons embedded into three-dimensional space, but there are no restrictions on the geometry of vertices.

Methods

impl<A> NGon<A> where
    A: Array
[src]

pub fn into_array(self) -> A[src]

Trait Implementations

impl<T> Topological for NGon<[T; 2]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 3]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 4]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 5]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 6]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 7]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 8]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 9]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 10]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 11]>[src]

type Vertex = T

impl<T> Topological for NGon<[T; 12]>[src]

type Vertex = T

impl<T> Polygonal for NGon<[T; 3]>[src]

impl<T> Polygonal for NGon<[T; 4]>[src]

impl<T> Polygonal for NGon<[T; 5]>[src]

impl<T> Polygonal for NGon<[T; 6]>[src]

impl<T> Polygonal for NGon<[T; 7]>[src]

impl<T> Polygonal for NGon<[T; 8]>[src]

impl<T> Polygonal for NGon<[T; 9]>[src]

impl<T> Polygonal for NGon<[T; 10]>[src]

impl<T> Polygonal for NGon<[T; 11]>[src]

impl<T> Polygonal for NGon<[T; 12]>[src]

impl<T> ConstantArity for NGon<[T; 2]>[src]

impl<T> ConstantArity for NGon<[T; 3]>[src]

impl<T> ConstantArity for NGon<[T; 4]>[src]

impl<T> ConstantArity for NGon<[T; 5]>[src]

impl<T> ConstantArity for NGon<[T; 6]>[src]

impl<T> ConstantArity for NGon<[T; 7]>[src]

impl<T> ConstantArity for NGon<[T; 8]>[src]

impl<T> ConstantArity for NGon<[T; 9]>[src]

impl<T> ConstantArity for NGon<[T; 10]>[src]

impl<T> ConstantArity for NGon<[T; 11]>[src]

impl<T> ConstantArity for NGon<[T; 12]>[src]

impl<A> AsRef<[<A as Array>::Item]> for NGon<A> where
    A: Array
[src]

impl<A> AsMut<[<A as Array>::Item]> for NGon<A> where
    A: Array
[src]

impl<A> From<A> for NGon<A> where
    A: Array
[src]

impl<T> From<NGon<[T; 3]>> for Polygon<T>[src]

impl<T> From<NGon<[T; 4]>> for Polygon<T>[src]

impl<A> IntoIterator for NGon<A> where
    A: Array
[src]

type Item = <A as Array>::Item

The type of the elements being iterated over.

type IntoIter = <Self::Output as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<A: Clone> Clone for NGon<A> where
    A: Array
[src]

impl<A: Copy> Copy for NGon<A> where
    A: Array
[src]

impl<A: Debug> Debug for NGon<A> where
    A: Array
[src]

impl<A> Index<usize> for NGon<A> where
    A: Array + AsRef<[<A as Array>::Item]>, 
[src]

type Output = A::Item

The returned type after indexing.

impl<A> IndexMut<usize> for NGon<A> where
    A: Array + AsRef<[<A as Array>::Item]> + AsMut<[<A as Array>::Item]>, 
[src]

impl<A> FromItems for NGon<A> where
    A: Array
[src]

impl<A> IntoItems for NGon<A> where
    A: Array
[src]

type Output = ArrayVec<A>

impl<T, U> Map<U> for NGon<[T; 2]>[src]

type Output = NGon<[U; 2]>

impl<T, U> Map<U> for NGon<[T; 3]>[src]

type Output = NGon<[U; 3]>

impl<T, U> Map<U> for NGon<[T; 4]>[src]

type Output = NGon<[U; 4]>

impl<T, U> Map<U> for NGon<[T; 5]>[src]

type Output = NGon<[U; 5]>

impl<T, U> Map<U> for NGon<[T; 6]>[src]

type Output = NGon<[U; 6]>

impl<T, U> Map<U> for NGon<[T; 7]>[src]

type Output = NGon<[U; 7]>

impl<T, U> Map<U> for NGon<[T; 8]>[src]

type Output = NGon<[U; 8]>

impl<T, U> Map<U> for NGon<[T; 9]>[src]

type Output = NGon<[U; 9]>

impl<T, U> Map<U> for NGon<[T; 10]>[src]

type Output = NGon<[U; 10]>

impl<T, U> Map<U> for NGon<[T; 11]>[src]

type Output = NGon<[U; 11]>

impl<T, U> Map<U> for NGon<[T; 12]>[src]

type Output = NGon<[U; 12]>

impl<T, U> ZipMap<U> for NGon<[T; 2]>[src]

type Output = NGon<[U; 2]>

impl<T, U> ZipMap<U> for NGon<[T; 3]>[src]

type Output = NGon<[U; 3]>

impl<T, U> ZipMap<U> for NGon<[T; 4]>[src]

type Output = NGon<[U; 4]>

impl<T, U> ZipMap<U> for NGon<[T; 5]>[src]

type Output = NGon<[U; 5]>

impl<T, U> ZipMap<U> for NGon<[T; 6]>[src]

type Output = NGon<[U; 6]>

impl<T, U> ZipMap<U> for NGon<[T; 7]>[src]

type Output = NGon<[U; 7]>

impl<T, U> ZipMap<U> for NGon<[T; 8]>[src]

type Output = NGon<[U; 8]>

impl<T, U> ZipMap<U> for NGon<[T; 9]>[src]

type Output = NGon<[U; 9]>

impl<T, U> ZipMap<U> for NGon<[T; 10]>[src]

type Output = NGon<[U; 10]>

impl<T, U> ZipMap<U> for NGon<[T; 11]>[src]

type Output = NGon<[U; 11]>

impl<T, U> ZipMap<U> for NGon<[T; 12]>[src]

type Output = NGon<[U; 12]>

impl<A, U> Fold<U> for NGon<A> where
    Self: Topological + IntoItems,
    A: Array
[src]

impl<A> Composite for NGon<A> where
    A: Array
[src]

type Item = A::Item

impl<T> Converged for NGon<[T; 2]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 3]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 4]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 5]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 6]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 7]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 8]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 9]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 10]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 11]> where
    T: Copy
[src]

impl<T> Converged for NGon<[T; 12]> where
    T: Copy
[src]

Auto Trait Implementations

impl<A> Send for NGon<A> where
    A: Send

impl<A> Sync for NGon<A> where
    A: Sync

impl<A> Unpin for NGon<A> where
    A: Unpin

impl<A> UnwindSafe for NGon<A> where
    A: UnwindSafe

impl<A> RefUnwindSafe for NGon<A> where
    A: RefUnwindSafe

Blanket Implementations

impl<P> Grouping for P where
    P: Topological,
    <P as Topological>::Vertex: Copy,
    <P as Topological>::Vertex: Integer,
    <P as Topological>::Vertex: NumCast,
    <P as Topological>::Vertex: Unsigned
[src]

type Item = P

Topological index buffers contain $n$-gons that explicitly group their indices.

impl<T> IntoVertices for T where
    T: IntoItems + Topological
[src]

type Output = <T as IntoItems>::Output

impl<T> FromGeometry<T> for T[src]

impl<T, U> IntoGeometry<U> for T where
    U: FromGeometry<T>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Slottable for T where
    T: Copy
[src]