[−][src]Struct pbrt::core::geometry::Bounds3
Generic type for 3D bounding boxes.
Fields
p_min: Point3<T>
point representing the minimum x,y,z value of the bounds.
p_max: Point3<T>
point representing the maximum x,y,z value of the bounds.
Methods
impl<T> Bounds3<T> where
T: Number,
[src]
T: Number,
pub fn inside_exclusive(&self, p: Point3<T>) -> bool
[src]
Determine if p
inside self
excluding upper-bounds.
Examples
use pbrt::core::geometry::Bounds3i; use pbrt::core::geometry::Point3i; let b = Bounds3i::from([[2, 2, 2], [4, 4, 4]]); assert!(b.inside_exclusive(Point3i::from([2, 2, 2]))); assert!(!b.inside_exclusive(Point3i::from([4, 4, 4])));
Trait Implementations
impl<T: Clone> Clone for Bounds3<T>
[src]
impl<T: Copy> Copy for Bounds3<T>
[src]
impl<T: Debug> Debug for Bounds3<T>
[src]
impl<T: Default> Default for Bounds3<T>
[src]
impl<T> From<[[T; 3]; 2]> for Bounds3<T> where
T: Number,
[src]
T: Number,
fn from(ps: [[T; 3]; 2]) -> Self
[src]
Create Bounds3<T>
from tuple of slices. It also ensures min/max are correct, regardless of
how they're arranged in the incoming slices.
Examples
use pbrt::core::geometry::Bounds3f; use pbrt::core::geometry::Point3f; let b = Bounds3f::from([[2., 3., 4.], [4., 5.,6.]]); assert_eq!( b, Bounds3f { p_min: Point3f { x: 2., y: 3.,z:4. }, p_max: Point3f { x: 4., y: 5.,z:6. } } ); let b = Bounds3f::from([[5., 4., 1.], [3., 2.,3.]]); assert_eq!(b, Bounds3f::from([[3., 2.,1.], [5., 4.,3.]]));
impl<T> From<[Point3<T>; 2]> for Bounds3<T> where
T: Number,
[src]
T: Number,
fn from(ps: [Point3<T>; 2]) -> Self
[src]
Create Bounds3<T>
from slice of Point3<t>
. It also ensures min/max are correct, regardless of
how they're arranged in the incoming Point3<t>
.
Examples
use pbrt::core::geometry::Bounds3f; use pbrt::core::geometry::Point3f; let b = Bounds3f::from([Point3f::from([2., 3.,4.]), Point3f::from([4., 5.,6.])]); assert_eq!( b, Bounds3f { p_min: Point3f { x: 2., y: 3. ,z:4.}, p_max: Point3f { x: 4., y: 5.,z:6. } } ); let b = Bounds3f::from([Point3f::from([5., 4.,1.]), Point3f::from([3., 2.,3.])]); assert_eq!(b, Bounds3f::from([[3., 2.,1.], [5., 4.,3.]]));
impl<T: PartialEq> PartialEq<Bounds3<T>> for Bounds3<T>
[src]
impl<T> StructuralPartialEq for Bounds3<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Bounds3<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Bounds3<T> where
T: Send,
T: Send,
impl<T> Sync for Bounds3<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Bounds3<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Bounds3<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,