[][src]Struct ray::scene::Vector

pub struct Vector {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

Fields

x: f32y: f32z: f32

Methods

impl Vector[src]

pub fn almost_equal_with_epsilon(&self, other: &Vector, epsilon: f32) -> bool[src]

pub fn zero() -> Vector[src]

pub fn unitx() -> UnitVector[src]

pub fn unity() -> UnitVector[src]

pub fn unitz() -> UnitVector[src]

pub fn dot(&self, other: &Vector) -> f32[src]

pub fn cross(&self, other: &Vector) -> Vector[src]

pub fn len(&self) -> f32[src]

pub fn normalized(&self) -> UnitVector[src]

pub fn is_normalized(&self) -> bool[src]

Trait Implementations

impl Add<Vector> for Vector[src]

type Output = Vector

The resulting type after applying the + operator.

impl AlmostEqual for Vector[src]

impl Clone for Vector[src]

impl Copy for Vector[src]

impl Debug for Vector[src]

impl Div<f32> for Vector[src]

type Output = Vector

The resulting type after applying the / operator.

impl Mul<Vector> for f32[src]

type Output = Vector

The resulting type after applying the * operator.

impl Mul<f32> for Vector[src]

type Output = Vector

The resulting type after applying the * operator.

impl Neg for Vector[src]

type Output = Vector

The resulting type after applying the - operator.

impl Sub<Vector> for Vector[src]

type Output = Vector

The resulting type after applying the - operator.

Auto Trait Implementations

impl RefUnwindSafe for Vector

impl Send for Vector

impl Sync for Vector

impl Unpin for Vector

impl UnwindSafe for Vector

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> 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.