[−][src]Struct ray_tracer::vector::Vec3
Methods
impl<T> Vec3<T> where
T: Float,
[src]
T: Float,
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]
T: Float,
impl<T> Add<Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the +
operator.
fn add(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Add<&'_ Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the +
operator.
fn add(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Add<Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the +
operator.
fn add(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_, '_> Add<&'_ Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the +
operator.
fn add(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T> Sub<Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the -
operator.
fn sub(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Sub<&'_ Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the -
operator.
fn sub(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Sub<Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the -
operator.
fn sub(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_, '_> Sub<&'_ Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the -
operator.
fn sub(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T> Mul<Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Mul<&'_ Vec3<T>> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T, '_> Mul<Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: Vec3<T>) -> Vec3<T>
[src]
impl<T, '_, '_> Mul<&'_ Vec3<T>> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: &Vec3<T>) -> Vec3<T>
[src]
impl<T> Mul<T> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Vec3<T>
[src]
impl Mul<Vec3<f64>> for f64
[src]
type Output = Vec3<f64>
The resulting type after applying the *
operator.
fn mul(self, other: Vec3<f64>) -> Vec3<f64>
[src]
impl Mul<Vec3<f32>> for f32
[src]
type Output = Vec3<f32>
The resulting type after applying the *
operator.
fn mul(self, other: Vec3<f32>) -> Vec3<f32>
[src]
impl<T, '_> Mul<T> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Vec3<T>
[src]
impl<'_> Mul<&'_ Vec3<f64>> for f64
[src]
type Output = Vec3<f64>
The resulting type after applying the *
operator.
fn mul(self, other: &Vec3<f64>) -> Vec3<f64>
[src]
impl<'_> Mul<&'_ Vec3<f32>> for f32
[src]
type Output = Vec3<f32>
The resulting type after applying the *
operator.
fn mul(self, other: &Vec3<f32>) -> Vec3<f32>
[src]
impl<T> Div<T> for Vec3<T> where
T: Float,
[src]
T: Float,
type Output = Vec3<T>
The resulting type after applying the /
operator.
fn div(self, other: T) -> Vec3<T>
[src]
impl<T, '_> Div<T> for &'_ Vec3<T> where
T: Float,
[src]
T: Float,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,