[][src]Struct ray_tracer::vector::Vec3

pub struct Vec3<T: Float> where
    T: Float
{ /* fields omitted */ }

Methods

impl<T> Vec3<T> where
    T: Float
[src]

pub fn new() -> Self[src]

pub fn from_array(input: [T; 3]) -> Self[src]

pub fn from_slice(input: &[T]) -> Self[src]

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

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

pub fn set_data(&mut self, data: &[T])[src]

pub fn dot(&self, other: &Vec3<T>) -> T[src]

pub fn cross(&self, other: &Vec3<T>) -> Vec3<T>[src]

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

pub fn normalize(&mut self)[src]

Trait Implementations

impl<T: Debug + Float> Debug for Vec3<T> where
    T: Float
[src]

impl<T> Add<Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the + operator.

impl<T, '_> Add<&'_ Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the + operator.

impl<T, '_> Add<Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the + operator.

impl<T, '_, '_> Add<&'_ Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the + operator.

impl<T> Sub<Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the - operator.

impl<T, '_> Sub<&'_ Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the - operator.

impl<T, '_> Sub<Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the - operator.

impl<T, '_, '_> Sub<&'_ Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the - operator.

impl<T> Mul<Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl<T, '_> Mul<&'_ Vec3<T>> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl<T, '_> Mul<Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl<T, '_, '_> Mul<&'_ Vec3<T>> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl<T> Mul<T> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl Mul<Vec3<f64>> for f64[src]

type Output = Vec3<f64>

The resulting type after applying the * operator.

impl Mul<Vec3<f32>> for f32[src]

type Output = Vec3<f32>

The resulting type after applying the * operator.

impl<T, '_> Mul<T> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Vec3<f64>> for f64[src]

type Output = Vec3<f64>

The resulting type after applying the * operator.

impl<'_> Mul<&'_ Vec3<f32>> for f32[src]

type Output = Vec3<f32>

The resulting type after applying the * operator.

impl<T> Div<T> for Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the / operator.

impl<T, '_> Div<T> for &'_ Vec3<T> where
    T: Float
[src]

type Output = Vec3<T>

The resulting type after applying the / operator.

Auto Trait Implementations

impl<T> Send for Vec3<T> where
    T: Send

impl<T> Sync for Vec3<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

The type returned in the event of a conversion error.

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