diff --git a/csg/src/brush.rs b/csg/src/brush.rs index a2a4d88..aa526fd 100644 --- a/csg/src/brush.rs +++ b/csg/src/brush.rs @@ -104,15 +104,8 @@ impl Brush { // TODO: No need to check against planes that are part of the intersection let mut raw_vertices = vec![]; for intersection in &intersections { - let mut valid = true; - for bplane in &self.planes { - if !intersection.in_halfspace_mat(&bplane.plane) { - valid = false; - break; - } - } - - if valid { + let mut iter = self.planes.iter(); + if iter.all(|bplane| intersection.in_halfspace_mat(&bplane.plane)) { raw_vertices.push(*intersection); } }