[−][src]Struct pbrt::core::geometry::Point3
Generic type for any 3D point.
Fields
x: T
The x coordinate of this point.
y: T
The y coordinate of this point.
z: T
The z coordinate of this point.
Methods
impl<T> Point3<T> where
T: Number,
[src]
T: Number,
pub fn min(p1: Point3<T>, p2: Point3<T>) -> Point3<T>
[src]
Create a new Point3
with the min x
, y
and z
values from p1 & p2.
Examples
use pbrt::core::geometry::Point3i; let p1 = Point3i::from([2, 4, 8]); let p2 = Point3i::from([7, 5, 3]); assert_eq!(Point3i::min(p1, p2), Point3i::from([2, 4, 3]));
pub fn max(p1: Point3<T>, p2: Point3<T>) -> Point3<T>
[src]
Create a new Point2
with the max x
, y
and z
values from p1 & p2.
Examples
use pbrt::core::geometry::Point3i; let p1 = Point3i::from([2, 4, 8]); let p2 = Point3i::from([7, 5, 3]); assert_eq!(Point3i::max(p1, p2), Point3i::from([7, 5, 8]));
Trait Implementations
impl<T: Clone> Clone for Point3<T>
[src]
impl<T: Copy> Copy for Point3<T>
[src]
impl<T: Debug> Debug for Point3<T>
[src]
impl<T: Default> Default for Point3<T>
[src]
impl<T> From<[T; 3]> for Point3<T> where
T: Number,
[src]
T: Number,
impl<T: PartialEq> PartialEq<Point3<T>> for Point3<T>
[src]
impl<T> StructuralPartialEq for Point3<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Point3<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Point3<T> where
T: Send,
T: Send,
impl<T> Sync for Point3<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Point3<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Point3<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>,