feat: Bbox drawing

This commit is contained in:
uttarayan21
2025-08-05 00:28:13 +05:30
parent df5584d797
commit 9fd0993cc3
3 changed files with 27 additions and 3 deletions

View File

@@ -108,7 +108,8 @@ impl<T: Num, const D: usize> AxisAlignedBoundingBox<T, D> {
let min = self.min_vertex();
let max = self.max_vertex();
*point > min && *point < max
// *point > min && *point < max
true
}
pub fn scale(self, vector: SVector<T, D>) -> Self
@@ -140,6 +141,18 @@ impl<T: Num, const D: usize> AxisAlignedBoundingBox<T, D> {
other_min >= self_min && other_max <= self_max
}
pub fn clamp(&self, other: &Self) -> Self
where
T: core::ops::AddAssign,
T: core::ops::SubAssign,
T: PartialOrd,
{
if self.contains_bbox(other) {
return *other;
}
todo!()
}
pub fn union(&self, other: &Self) -> Self
where
T: core::ops::AddAssign,