Use iter to simplify brush plane intersection validation
This commit is contained in:
parent
92249cf8c8
commit
4116ba40e5
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue