Struct mgf::Ray [] [src]

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

A point and a direction with infinite distance.

Fields

The origin of the ray.

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

Trait Implementations

impl Intersects<Plane> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<AABB> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Sphere> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Capsule> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Moving<Sphere>> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Triangle> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Rectangle> for Ray
[src]

[src]

Returns an Intersection if one exists.

impl Copy for Ray
[src]

impl Clone for Ray
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Ray
[src]

[src]

Formats the value using the given formatter.

impl From<Segment> for Ray
[src]

[src]

Performs the conversion.

impl MinDistance<Point3<f32>> for Ray
[src]

[src]

Returns closest point on ray to q

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

[src]

Performs the += operation.

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

[src]

Performs the -= operation.

impl Shape for Ray
[src]

[src]

Returns the center of mass of the geometry, assuming a regular density.

[src]

Sets the center of the shape to p.