Update comments

This commit is contained in:
Hanno Braun 2022-04-11 16:34:40 +02:00
parent 7e3bd1c120
commit bb61819550

View File

@ -72,14 +72,19 @@ impl Polygon {
let is_exterior_edge = self.contains_exterior_edge(edge); let is_exterior_edge = self.contains_exterior_edge(edge);
let is_interior_edge = self.contains_interior_edge(edge); let is_interior_edge = self.contains_interior_edge(edge);
// If the segment is an edge of the face, we don't need to take a // If the triangle edge is an edge of the face, we don't need to
// closer look. // take a closer look.
if is_exterior_edge || is_interior_edge { if is_exterior_edge || is_interior_edge {
continue; continue;
} }
// To determine if the edge is within the polygon, we determine if // To determine if the edge is within the polygon, we determine if
// its center point is in the polygon. // its center point is in the polygon.
//
// Since we already checked above, whether the triangle edge is a
// polygon edge (and if we reached this point, it isn't), we don't
// need to care about the distinction between "inside the polygon"
// and "on the polygon boundary".
if !self.contains_point(edge.center(), debug_info) { if !self.contains_point(edge.center(), debug_info) {
// The segment is outside of the face. This means we can throw // The segment is outside of the face. This means we can throw
// away the whole triangle. // away the whole triangle.