feat: Bbox drawing
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user