[][src]Struct pbrt::core::geometry::Point3

pub struct Point3<T> {
    pub x: T,
    pub y: T,
    pub z: T,
}

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]

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]

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

impl<T> Send for Point3<T> where
    T: Send

impl<T> Sync for Point3<T> where
    T: Sync

impl<T> Unpin for Point3<T> where
    T: Unpin

impl<T> UnwindSafe for Point3<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.