Struct triangulate::IndexWith

source ·
pub struct IndexWith<'p, P: PolygonList<'p, Index = OldIndex>, OldIndex: VertexIndex + Mappable<Old>, Old: TryInto<New>, New: TryInto<Old>>(_, _)
where
         OldIndex::Output<New>: VertexIndex + Mappable<New, Output<Old> = OldIndex>;
Expand description

Wrapper to change the PolygonList::Index type

Trait Implementations§

source§

impl<'p, P: Clone + PolygonList<'p, Index = OldIndex>, OldIndex: Clone + VertexIndex + Mappable<Old>, Old: Clone + TryInto<New>, New: Clone + TryInto<Old>> Clone for IndexWith<'p, P, OldIndex, Old, New>where OldIndex::Output<New>: VertexIndex + Mappable<New, Output<Old> = OldIndex>,

source§

fn clone(&self) -> IndexWith<'p, P, OldIndex, Old, New>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'p, P: Debug + PolygonList<'p, Index = OldIndex>, OldIndex: Debug + VertexIndex + Mappable<Old>, Old: Debug + TryInto<New>, New: Debug + TryInto<Old>> Debug for IndexWith<'p, P, OldIndex, Old, New>where OldIndex::Output<New>: VertexIndex + Mappable<New, Output<Old> = OldIndex>,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'p, P: PolygonList<'p, Index = OldIndex>, OldIndex: VertexIndex + Mappable<Old>, New: TryInto<Old>, Old: TryInto<New>> PolygonList<'p> for IndexWith<'p, P, OldIndex, Old, New>where OldIndex::Output<New>: VertexIndex + Mappable<New, Output<Old> = OldIndex>,

§

type Vertex = <P as PolygonList<'p>>::Vertex

The type of vertices of the polygons
§

type Index = <OldIndex as Mappable<Old>>::Output<New>

A type used to uniquely identify a Vertex (e.g. [usize; 2] for a Vec<Vec<[f32, f32]>>)
§

type IntoItem = PolygonElement<<IndexWith<'p, P, OldIndex, Old, New> as PolygonList<'p>>::Index>

§

type Iter<'i> where Self: 'i, 'p: 'i = IndexWithIter<'i, <P as PolygonList<'p>>::Iter<'i>, OldIndex, New, Old>

The Iterator type that PolygonList::iter_indices returns
source§

fn vertex_count(&self) -> usize

Provides the total number of vertices among all polygons.
source§

fn iter_indices<'i>(&'i self) -> Self::Iter<'i>where Self: 'i, Self::Vertex: 'i, 'p: 'i,

Iterate through all Indexes of all polygons. Indices must be returned in either clockwise or counter-clockwise order, without repeating the initial index. Between each polygon, implementers must return a NewPolygon value. Read more
source§

fn get_vertex<'a>(&'a self, index: Self::Index) -> &'a Self::Vertexwhere 'p: 'a,

Get the PolygonList::Vertex uniquely identified by index
source§

fn index_with<Old: TryInto<New>, New: TryInto<Old>>( self ) -> IndexWith<'p, Self, Self::Index, Old, New>where Self: Sized, Self::Index: VertexIndex + Mappable<Old>, <Self::Index as Mappable<Old>>::Output<New>: VertexIndex + Mappable<New, Output<Old> = Self::Index>,

Substitute the PolygonList::Index type with another. Read more
source§

fn trapezoidize( &'p self ) -> Result<Trapezoidation<'p, Self>, TrapezoidationError>

Generate a Trapezoidation, which can later be triangulated. Read more
source§

fn triangulate<FB: FanFormat<'p, Self>>( &'p self, format: FB ) -> Result<<FB::Builder as FanBuilder<'p, Self>>::Output, TriangulationError<<FB::Builder as FanBuilder<'p, Self>>::Error>>

Triangulate the polygons into the layout specified by format
source§

impl<'p, P: Copy + PolygonList<'p, Index = OldIndex>, OldIndex: Copy + VertexIndex + Mappable<Old>, Old: Copy + TryInto<New>, New: Copy + TryInto<Old>> Copy for IndexWith<'p, P, OldIndex, Old, New>where OldIndex::Output<New>: VertexIndex + Mappable<New, Output<Old> = OldIndex>,

Auto Trait Implementations§

§

impl<'p, P, OldIndex, Old, New> RefUnwindSafe for IndexWith<'p, P, OldIndex, Old, New>where New: RefUnwindSafe, Old: RefUnwindSafe, OldIndex: RefUnwindSafe, P: RefUnwindSafe,

§

impl<'p, P, OldIndex, Old, New> Send for IndexWith<'p, P, OldIndex, Old, New>where New: Sync, Old: Sync, OldIndex: Sync, P: Send,

§

impl<'p, P, OldIndex, Old, New> Sync for IndexWith<'p, P, OldIndex, Old, New>where New: Sync, Old: Sync, OldIndex: Sync, P: Sync,

§

impl<'p, P, OldIndex, Old, New> Unpin for IndexWith<'p, P, OldIndex, Old, New>where P: Unpin,

§

impl<'p, P, OldIndex, Old, New> UnwindSafe for IndexWith<'p, P, OldIndex, Old, New>where New: RefUnwindSafe, Old: RefUnwindSafe, OldIndex: RefUnwindSafe, P: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V