Add AABB intersection test to brushes
This commit is contained in:
parent
bcf73c0251
commit
92249cf8c8
|
@ -64,6 +64,10 @@ impl Brush {
|
|||
self.aabb = Aabb::from_positions(&self.vertices);
|
||||
}
|
||||
|
||||
pub fn aabb_intersects_with(&self, other: &Brush) -> bool {
|
||||
self.aabb.intersects(other.get_aabb())
|
||||
}
|
||||
|
||||
pub fn get_vertices(&self) -> Vec<Vec3> {
|
||||
self.vertices.clone()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue