Observer

Trait Observer 

Source
pub trait Observer {
    // Provided methods
    fn enter_point_event(&mut self, point_id: PointId, context: &Context<'_>) { ... }
    fn exit_point_event(&mut self, point_id: PointId, context: &Context<'_>) { ... }
    fn edge_event(&mut self, edge: Edge, context: &Context<'_>) { ... }
    fn sweep_done(&mut self, context: &Context<'_>) { ... }
    fn finalized(&mut self, context: &Context<'_>) { ... }
    fn will_legalize(&mut self, triangle_id: TriangleId, context: &Context<'_>) { ... }
    fn legalize_step(&mut self, triangle_id: TriangleId, context: &Context<'_>) { ... }
    fn triangle_rotated(
        &mut self,
        triangle_id: TriangleId,
        opposite_triangle_id: TriangleId,
        context: &Context<'_>,
    ) { ... }
    fn legalized(&mut self, triangel_id: TriangleId, context: &Context<'_>) { ... }
}
Expand description

Observer for sweeper, used to monitor how sweeper works, quite useful for visual debugging when things goes wrong. Check example’s draw.

Provided Methods§

Source

fn enter_point_event(&mut self, point_id: PointId, context: &Context<'_>)

A point_event processed

Source

fn exit_point_event(&mut self, point_id: PointId, context: &Context<'_>)

Source

fn edge_event(&mut self, edge: Edge, context: &Context<'_>)

An edge event processed

Source

fn sweep_done(&mut self, context: &Context<'_>)

Sweep process done

Source

fn finalized(&mut self, context: &Context<'_>)

The result finalized, holes, fake points etc cleaned.

Source

fn will_legalize(&mut self, triangle_id: TriangleId, context: &Context<'_>)

About to legalize for triangle

Source

fn legalize_step(&mut self, triangle_id: TriangleId, context: &Context<'_>)

A single step inside one legalization process

Source

fn triangle_rotated( &mut self, triangle_id: TriangleId, opposite_triangle_id: TriangleId, context: &Context<'_>, )

A rotate happened

Source

fn legalized(&mut self, triangel_id: TriangleId, context: &Context<'_>)

The triangle legalized

Implementations on Foreign Types§

Source§

impl Observer for ()

Default dummy observer, blank impl, so all calls should be optimized out by compiler.

Implementors§