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
|
// TODO: No need to check against planes that are part of the intersection
|
||||||
let mut raw_vertices = vec![];
|
let mut raw_vertices = vec![];
|
||||||
for intersection in &intersections {
|
for intersection in &intersections {
|
||||||
let mut valid = true;
|
let mut iter = self.planes.iter();
|
||||||
for bplane in &self.planes {
|
if iter.all(|bplane| intersection.in_halfspace_mat(&bplane.plane)) {
|
||||||
if !intersection.in_halfspace_mat(&bplane.plane) {
|
|
||||||
valid = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if valid {
|
|
||||||
raw_vertices.push(*intersection);
|
raw_vertices.push(*intersection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue