pub struct Aabb {
pub x: Interval,
pub y: Interval,
pub z: Interval,
}Expand description
Axis Aligned Bounding Box
Fields§
§x: IntervalX axis interval
y: Intervaly axis interval
z: Intervalz axis interval
Implementations§
Source§impl Aabb
impl Aabb
Sourcepub fn new_from_2_points(a: Vec3, b: Vec3) -> Aabb
pub fn new_from_2_points(a: Vec3, b: Vec3) -> Aabb
Create a new aabb exactly encapsulating the two given points
Sourcepub fn new_from_3_points(a: Vec3, b: Vec3, c: Vec3) -> Aabb
pub fn new_from_3_points(a: Vec3, b: Vec3, c: Vec3) -> Aabb
Create a new aabb exactly encapsulating the three given points
Sourcepub fn combine(&self, a: &Aabb) -> Aabb
pub fn combine(&self, a: &Aabb) -> Aabb
Create a new aabb that is the sum of the two given aabb’s
Sourcepub fn pad_if_needed(&self) -> Aabb
pub fn pad_if_needed(&self) -> Aabb
Create a new aabb the same size as self. Except for axis that are very small, these are padded a bit
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().