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§
Sourcefn enter_point_event(&mut self, point_id: PointId, context: &Context<'_>)
fn enter_point_event(&mut self, point_id: PointId, context: &Context<'_>)
A point_event processed
fn exit_point_event(&mut self, point_id: PointId, context: &Context<'_>)
Sourcefn edge_event(&mut self, edge: Edge, context: &Context<'_>)
fn edge_event(&mut self, edge: Edge, context: &Context<'_>)
An edge event processed
Sourcefn sweep_done(&mut self, context: &Context<'_>)
fn sweep_done(&mut self, context: &Context<'_>)
Sweep process done
Sourcefn finalized(&mut self, context: &Context<'_>)
fn finalized(&mut self, context: &Context<'_>)
The result finalized, holes, fake points etc cleaned.
Sourcefn will_legalize(&mut self, triangle_id: TriangleId, context: &Context<'_>)
fn will_legalize(&mut self, triangle_id: TriangleId, context: &Context<'_>)
About to legalize for triangle
Sourcefn legalize_step(&mut self, triangle_id: TriangleId, context: &Context<'_>)
fn legalize_step(&mut self, triangle_id: TriangleId, context: &Context<'_>)
A single step inside one legalization process
Sourcefn triangle_rotated(
&mut self,
triangle_id: TriangleId,
opposite_triangle_id: TriangleId,
context: &Context<'_>,
)
fn triangle_rotated( &mut self, triangle_id: TriangleId, opposite_triangle_id: TriangleId, context: &Context<'_>, )
A rotate happened
Sourcefn legalized(&mut self, triangel_id: TriangleId, context: &Context<'_>)
fn legalized(&mut self, triangel_id: TriangleId, context: &Context<'_>)
The triangle legalized
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
impl Observer for ()
Default dummy observer, blank impl, so all calls should be optimized out by compiler.