Trait triangulate::ListFormat
source · 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§
sourcetype Builder: ListBuilder<'p, P> + Sized
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§
sourcefn initialize(
self,
polygon_list: &'p P
) -> Result<Self::Builder, <Self::Builder as ListBuilder<'p, P>>::Error>
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§
sourcefn into_fan_format(self) -> FanToListFormat<'p, P, Self>where
Self: Sized,
fn into_fan_format(self) -> FanToListFormat<'p, P, Self>where Self: Sized,
Converts this ListFormat into a FanFormat, the format type required for triangulation.