[][src]Struct mgf::Segment

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

A point and a direction with a finite distance.

Fields

a: Point3<f32>

The starting point of the segment.

b: Point3<f32>

The end point of the segment.

Methods

impl Segment[src]

pub fn new(from: Point3<f32>, to: Point3<f32>) -> Self[src]

Create a new segment

Trait Implementations

impl Shape for Segment[src]

fn set_pos(&mut self, p: Point3<f32>)[src]

Sets the center of the shape to p.

impl Particle for Segment[src]

A segment represents a point particle traveling in a direction with finite velocity.

impl Clone for Segment[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl From<Segment> for Ray[src]

impl From<Capsule> for Segment[src]

impl Copy for Segment[src]

impl Debug for Segment[src]

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

type Output = Self

The resulting type after applying the + operator.

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

type Output = Self

The resulting type after applying the - operator.

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

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

Auto Trait Implementations

impl Send for Segment

impl Sync for Segment

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.