pub struct AABB3 {
pub min: Point3,
pub max: Point3,
}Expand description
3D axis-aligned bounding box.
Fields§
§min: Point3§max: Point3Implementations§
Source§impl AABB3
impl AABB3
pub fn new(min: Point3, max: Point3) -> Self
pub fn from_points(pts: &[Point3]) -> Option<Self>
pub fn center(self) -> Point3
pub fn half_extents(self) -> Point3
pub fn volume(self) -> f64
pub fn surface_area(self) -> f64
pub fn contains(self, p: Point3) -> bool
pub fn intersects(self, other: AABB3) -> bool
pub fn merge(self, other: AABB3) -> AABB3
Trait Implementations§
impl Copy for AABB3
impl StructuralPartialEq for AABB3
Auto Trait Implementations§
impl Freeze for AABB3
impl RefUnwindSafe for AABB3
impl Send for AABB3
impl Sync for AABB3
impl Unpin for AABB3
impl UnsafeUnpin for AABB3
impl UnwindSafe for AABB3
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