Trait Tessellator

Source
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§

Source

type Error: Error + Send + Sync + 'static

Structured failure.

Required Methods§

Source

fn tessellate( &self, graph: &GeometryGraph, root: NodeId, options: &TessellationOptions, ) -> Result<TessellatedMesh, Self::Error>

Tessellate one node.

Provided Methods§

Source

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.

Implementors§