[][src]Struct mgf::Ray

pub struct Ray {
    pub p: Point3<f32>,
    pub d: Vector3<f32>,
}

A point and a direction with infinite distance.

Fields

p: Point3<f32>

The origin of the ray.

d: Vector3<f32>

The direction of the ray. Does not need to be normalized.

Methods

impl Ray[src]

pub fn new(origin: Point3<f32>, dir: Vector3<f32>) -> Self[src]

Create a new ray.

pub fn clamp(&self, t: f32) -> Segment[src]

Clamp a ray's distance to create a segment.

Trait Implementations

impl Add<Vector3<f32>> for Ray[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Vector3<f32>> for Ray[src]

impl Clone for Ray[src]

impl Copy for Ray[src]

impl Debug for Ray[src]

impl<'de> Deserialize<'de> for Ray[src]

impl From<Segment> for Ray[src]

impl Particle for Ray[src]

A ray represents a point particle traveling in a direction with infinite velocity.

impl Serialize for Ray[src]

impl Shape for Ray[src]

impl Sub<Vector3<f32>> for Ray[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector3<f32>> for Ray[src]

Auto Trait Implementations

impl RefUnwindSafe for Ray

impl Send for Ray

impl Sync for Ray

impl Unpin for Ray

impl UnwindSafe for Ray

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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.