Struct rs_math3d::primitives::Line[][src]

#[repr(C)]
pub struct Line<T: Scalar, V: Vector<T>> { pub p: V, pub d: V, // some fields omitted }
Expand description

Line

Fields

p: Vd: V

Implementations

impl<T: Scalar, V: Vector<T>> Line<T, V>[src]

pub fn new(p: &V, d: &V) -> Self[src]

pub fn from_start_end(s: &V, e: &V) -> Self[src]

pub fn normalize(&self) -> Self[src]

pub fn closest_point_on_line(&self, p: &V) -> (T, V)[src]

Trait Implementations

impl<T: Clone + Scalar, V: Clone + Vector<T>> Clone for Line<T, V>[src]

fn clone(&self) -> Line<T, V>[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<T: Debug + Scalar, V: Debug + Vector<T>> Debug for Line<T, V>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Copy + Scalar, V: Copy + Vector<T>> Copy for Line<T, V>[src]

Auto Trait Implementations

impl<T, V> Send for Line<T, V> where
    T: Send,
    V: Send

impl<T, V> Sync for Line<T, V> where
    T: Sync,
    V: Sync

impl<T, V> Unpin for Line<T, V> where
    T: Unpin,
    V: Unpin

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.