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

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

Monomorphic $n$-gon.

NGon represents a polygonal structure as an array. Each array element represents vertex data in order with adjacent 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.

Implementations

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

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

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

pub fn new(a: T, b: T) -> Self[src]

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

pub fn new(a: T, b: T, c: T) -> Self[src]

pub fn plane(&self) -> Option<Plane<Position<T>>> where
    T: AsPosition,
    Position<T>: EuclideanSpace + FiniteDimensional<N = U3>,
    Vector<Position<T>>: Cross<Output = Vector<Position<T>>>, 
[src]

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

pub fn new(a: T, b: T, c: T, d: T) -> Self[src]

Trait Implementations

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

type Item = A::Item

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

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

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

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; 12]> 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<A: Copy> Copy for NGon<A> where
    A: Array
[src]

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

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

type Dynamic = usize

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

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

impl<T> From<NGon<[T; 10]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 11]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 12]>> for UnboundedPolygon<T> where
    T: Clone
[src]

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

impl<T> From<NGon<[T; 3]>> for UnboundedPolygon<T> where
    T: Clone
[src]

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

impl<T> From<NGon<[T; 4]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 5]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 6]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 7]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 8]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<T> From<NGon<[T; 9]>> for UnboundedPolygon<T> where
    T: Clone
[src]

impl<A> FromItems 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> IntoItems for NGon<A> where
    A: Array
[src]

type Output = ArrayVec<A>

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<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; 12]>[src]

type Output = NGon<[U; 12]>

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> Monomorphic for NGon<[T; 2]>[src]

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

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

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

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

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

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

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

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

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

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

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> StaticArity for NGon<[T; 2]>[src]

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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

type Static = usize

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; 12]>[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, 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; 12]>[src]

type Output = NGon<[U; 12]>

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]>

Auto Trait Implementations

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

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

Blanket Implementations

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

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

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

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

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

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

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

type Group = P

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

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

impl<T, U> IntoGeometry<U> for T where
    U: FromGeometry<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> IntoVertices for T where
    T: IntoItems + Topological
[src]

type Output = <T as IntoItems>::Output

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,