pub struct Bounds3<T> {
pub min: Vector3<T>,
pub max: Vector3<T>,
}
Fields§
§min: Vector3<T>
§max: Vector3<T>
Implementations§
Source§impl<T: Copy + PartialOrd> Bounds3<T>
impl<T: Copy + PartialOrd> Bounds3<T>
Source§impl<T: Copy + PartialOrd + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>> Bounds3<T>
impl<T: Copy + PartialOrd + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>> Bounds3<T>
pub fn area(&self) -> T
pub fn diagonal(&self) -> Vector3<T>
pub fn maximum_extent(&self) -> usize
pub fn offset(&self, p: &Vector3<T>) -> Vector3<T>
pub fn expand(&self, delta: T) -> Self
pub fn union(&self, other: &Self) -> Self
pub fn intersect(&self, other: &Self) -> Self
pub fn union_p(&self, other: &Vector3<T>) -> Self
pub fn inside_exclusive(&self, p: &Vector3<T>) -> bool
Source§impl Bounds3<f32>
impl Bounds3<f32>
pub fn intersect_p(&self, ray: &Ray) -> Option<(Float, Float)>
pub fn lerp(&self, t: &Vector3f) -> Vector3f
pub fn bounding_sphere(&self) -> (Vector3f, Float)
pub fn surface_area(&self) -> Float
pub fn distance_squared(&self, p: &Point3f) -> Float
pub fn distance(&self, p: &Point3f) -> Float
Trait Implementations§
impl<T: Copy> Copy for Bounds3<T>
impl<T> StructuralPartialEq for Bounds3<T>
Auto Trait Implementations§
impl<T> Freeze for Bounds3<T>where
T: Freeze,
impl<T> RefUnwindSafe for Bounds3<T>where
T: RefUnwindSafe,
impl<T> Send for Bounds3<T>where
T: Send,
impl<T> Sync for Bounds3<T>where
T: Sync,
impl<T> Unpin for Bounds3<T>where
T: Unpin,
impl<T> UnwindSafe for Bounds3<T>where
T: UnwindSafe,
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()
.