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>,
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§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>,
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§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>,
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
type Vertex = <P as PolygonList<'p>>::Vertex
The type of vertices of the polygons
§type IntoItem = PolygonElement<<IndexWith<'p, P, OldIndex, Old, New> as PolygonList<'p>>::Index>
type IntoItem = PolygonElement<<IndexWith<'p, P, OldIndex, Old, New> as PolygonList<'p>>::Index>
The PolygonList::Index Iterator type
§type Iter<'i>
where
Self: 'i,
'p: 'i = IndexWithIter<'i, <P as PolygonList<'p>>::Iter<'i>, OldIndex, New, Old>
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
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,
fn iter_indices<'i>(&'i self) -> Self::Iter<'i>where Self: 'i, Self::Vertex: 'i, 'p: 'i,
Iterate through all
Index
es 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 moresource§fn get_vertex<'a>(&'a self, index: Self::Index) -> &'a Self::Vertexwhere
'p: 'a,
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>,
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>
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>>
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