pub trait ListFormat<'p, P: PolygonList<'p> + ?Sized> {
    type Builder: ListBuilder<'p, P> + Sized;

    // Required method
    fn initialize(
        self,
        polygon_list: &'p P
    ) -> Result<Self::Builder, <Self::Builder as ListBuilder<'p, P>>::Error>;

    // Provided method
    fn into_fan_format(self) -> FanToListFormat<'p, P, Self>
       where Self: Sized { ... }
}
Expand description

Describes the construction and layout of a triangle list

Required Associated Types§

source

type Builder: ListBuilder<'p, P> + Sized

The type responsible for constructing the triangle list.

This type can be Self, if you choose to implement both ListFormat and ListBuilder on the same type.

Required Methods§

source

fn initialize( self, polygon_list: &'p P ) -> Result<Self::Builder, <Self::Builder as ListBuilder<'p, P>>::Error>

Constructs a ListFormat::Builder, optionally using a reference to the PolygonList being triangulated.

Provided Methods§

source

fn into_fan_format(self) -> FanToListFormat<'p, P, Self>where Self: Sized,

Converts this ListFormat into a FanFormat, the format type required for triangulation.

Implementors§

source§

impl<'p, P: PolygonList<'p> + ?Sized, L: List<P::Index>> ListFormat<'p, P> for IndexedListFormat<'p, P, L>

§

type Builder = IndexedListBuilder<'p, P, L>

source§

impl<'p, P: PolygonList<'p> + ?Sized, L: List<P::Vertex>> ListFormat<'p, P> for DeindexedListFormat<'p, P, L>where P::Vertex: Clone,

§

type Builder = DeindexedListBuilder<'p, P, L>