pub struct Aabb {
pub min: [f64; 3],
pub max: [f64; 3],
}Expand description
An axis-aligned bounding box with explicit min/max corners.
Fields§
§min: [f64; 3]§max: [f64; 3]Implementations§
Source§impl Aabb
impl Aabb
pub fn new(min: [f64; 3], max: [f64; 3]) -> Self
Sourcepub fn from_positions(positions: &[f64]) -> Aabb
pub fn from_positions(positions: &[f64]) -> Aabb
Axis-aligned bounds of a packed [x, y, z, ...] position buffer.
Mirrors fromPositions; the optional transform from the TS source is
dropped because the native API ingests world-space geometry directly.
Stays a hand-written buffer walk (the generated math is per-box, not
over a flat vertex stream).
Sourcepub fn inflate(&self, m: f64) -> Aabb
pub fn inflate(&self, m: f64) -> Aabb
Expand bounds by m on every side. Delegates to Box3::Inflate.
Sourcepub fn intersects(&self, b: &Aabb) -> bool
pub fn intersects(&self, b: &Aabb) -> bool
True when the two boxes overlap (touching counts). Delegates to
Box3::Intersects.
Trait Implementations§
impl Copy for Aabb
impl StructuralPartialEq for Aabb
Auto Trait Implementations§
impl Freeze for Aabb
impl RefUnwindSafe for Aabb
impl Send for Aabb
impl Sync for Aabb
impl Unpin for Aabb
impl UnwindSafe for Aabb
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more