Struct mgf::Segment [] [src]

pub struct Segment {
    pub a: Point3<f32>,
    pub b: Point3<f32>,
}

A point and a direction with a finite distance.

Fields

The starting point of the segment.

The end point of the segment.

Trait Implementations

impl<RHS: Intersects<Ray>> Intersects<RHS> for Segment
[src]

Anything that can collide with a ray can collide with a line segment.

[src]

Returns an Intersection if one exists.

impl Copy for Segment
[src]

impl Clone for Segment
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Segment
[src]

[src]

Formats the value using the given formatter.

impl From<(Point3<f32>, Point3<f32>)> for Segment
[src]

[src]

Performs the conversion.

impl From<Capsule> for Segment
[src]

[src]

Performs the conversion.

impl MinDistance<Point3<f32>, f32> for Segment
[src]

[src]

Returns squared distance between the segment and the point.

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

[src]

Returns closest point on segment to q

impl MinDistance<Segment, Option<(Point3<f32>, Point3<f32>)>> for Segment
[src]

[src]

Returns the a pair of points that are the minimum distance from each other. If the segments are parallel, return None.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

[src]

Performs the += operation.

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

[src]

Performs the -= operation.

impl Shape for Segment
[src]

[src]

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

[src]

Sets the center of the shape to p.