pub struct Aabb {
pub min: [f64; 3],
pub max: [f64; 3],
}Expand description
Axis-aligned bounding box.
Fields§
§min: [f64; 3]Minimum corner.
max: [f64; 3]Maximum corner.
Implementations§
Source§impl Aabb
impl Aabb
Sourcepub fn expand_point(&self, p: [f64; 3]) -> Self
pub fn expand_point(&self, p: [f64; 3]) -> Self
Expand AABB to include a point.
Sourcepub fn surface_area(&self) -> f64
pub fn surface_area(&self) -> f64
Surface area of the AABB.
Sourcepub fn longest_axis(&self) -> usize
pub fn longest_axis(&self) -> usize
Longest axis (0=X, 1=Y, 2=Z).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aabb
impl RefUnwindSafe for Aabb
impl Send for Aabb
impl Sync for Aabb
impl Unpin for Aabb
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more