Don't draw the super triangles

This commit is contained in:
Emi Simpson 2021-11-16 18:00:17 -05:00
parent f1a90f0d9a
commit 072389548f
Signed by: Emi
GPG Key ID: A12F2C2FFDC3D847
1 changed files with 9 additions and 0 deletions

View File

@ -464,6 +464,15 @@ impl DelaunayDemo {
};
let edge_0 = edge.0.get().as_f32();
let edge_1 = edge.1.get().as_f32();
if
edge_0.x < 0.0 || edge_0.x > screen_width()
|| edge_0.y < 0.0 || edge_0.y > screen_height()
|| edge_1.x < 0.0 || edge_1.x > screen_width()
|| edge_1.y < 0.0 || edge_1.y > screen_height()
{
continue; //don't draw container nodes
}
draw_line(
edge_0.x,
edge_0.y,