pub trait ListBuilder<'p, P: PolygonList<'p> + ?Sized> {
type Output;
type Error: Error;
const WINDING: TriangleWinding = TriangleWinding::Counterclockwise;
// Required methods
fn add_triangle(
&mut self,
vi0: P::Index,
vi1: P::Index,
vi2: P::Index,
) -> Result<(), Self::Error>;
fn build(self) -> Result<Self::Output, Self::Error>;
fn fail(self, error: &TriangulationError<Self::Error>);
}Expand description
Performs the construction of a triangle list
Provided Associated Constants§
Sourceconst WINDING: TriangleWinding = TriangleWinding::Counterclockwise
const WINDING: TriangleWinding = TriangleWinding::Counterclockwise
The winding direction this builder expects for triangles
Required Associated Types§
Required Methods§
Sourcefn add_triangle(
&mut self,
vi0: P::Index,
vi1: P::Index,
vi2: P::Index,
) -> Result<(), Self::Error>
fn add_triangle( &mut self, vi0: P::Index, vi1: P::Index, vi2: P::Index, ) -> Result<(), Self::Error>
Adds a triangle with the given indices
Sourcefn build(self) -> Result<Self::Output, Self::Error>
fn build(self) -> Result<Self::Output, Self::Error>
Called when triangulation has completed to get the resulting output
Sourcefn fail(self, error: &TriangulationError<Self::Error>)
fn fail(self, error: &TriangulationError<Self::Error>)
Called when triangulation encounters an error.
Any required cleanup (e.g. removing the partial triangulation added to an existing Vec) should be done here
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.