pub trait Tessellator:
Debug
+ Send
+ Sync {
type Error: Error + Send + Sync + 'static;
// Required method
fn tessellate(
&self,
graph: &GeometryGraph,
root: NodeId,
options: &TessellationOptions,
) -> Result<TessellatedMesh, Self::Error>;
// Provided method
fn tessellate_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &TessellationOptions,
) -> Result<Vec<TessellatedMesh>, Self::Error> { ... }
}Expand description
Convert exact graph nodes to watertight triangle meshes.
Required Associated Types§
Required Methods§
Sourcefn tessellate(
&self,
graph: &GeometryGraph,
root: NodeId,
options: &TessellationOptions,
) -> Result<TessellatedMesh, Self::Error>
fn tessellate( &self, graph: &GeometryGraph, root: NodeId, options: &TessellationOptions, ) -> Result<TessellatedMesh, Self::Error>
Tessellate one node.
Provided Methods§
Sourcefn tessellate_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &TessellationOptions,
) -> Result<Vec<TessellatedMesh>, Self::Error>
fn tessellate_batch( &self, graph: &GeometryGraph, roots: &[NodeId], options: &TessellationOptions, ) -> Result<Vec<TessellatedMesh>, Self::Error>
Tessellate many roots. Implementations should override for parallel/GPU batching and must preserve input order.