Struct radiant_utils::maths::Vec3 [−][src]
pub struct Vec3<T = f32>(pub T, pub T, pub T);
A 3-dimensional vector.
Methods
impl<T> Vec3<T> where
T: Float, [src]
impl<T> Vec3<T> where
T: Float, pub fn new() -> Vec3<T>[src]
pub fn new() -> Vec3<T>Creates a new instances.
pub fn len(&self) -> T[src]
pub fn len(&self) -> TReturns the length of the vector
pub fn dot(&self, other: &Vec3<T>) -> T[src]
pub fn dot(&self, other: &Vec3<T>) -> TReturns the dot-product of the vectors.
Trait Implementations
impl<T: Copy> Copy for Vec3<T>[src]
impl<T: Copy> Copy for Vec3<T>impl<T: Clone> Clone for Vec3<T>[src]
impl<T: Clone> Clone for Vec3<T>fn clone(&self) -> Vec3<T>[src]
fn clone(&self) -> Vec3<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T> Vector<T> for Vec3<T> where
T: Copy, [src]
impl<T> Vector<T> for Vec3<T> where
T: Copy, impl<T> From<[T; 3]> for Vec3<T> where
T: Copy, [src]
impl<T> From<[T; 3]> for Vec3<T> where
T: Copy, impl From<Vec3<f32>> for [f32; 3][src]
impl From<Vec3<f32>> for [f32; 3]impl From<Vec3<f64>> for [f64; 3][src]
impl From<Vec3<f64>> for [f64; 3]impl<T> From<(T, T, T)> for Vec3<T>[src]
impl<T> From<(T, T, T)> for Vec3<T>impl From<Vec3<f32>> for (f32, f32, f32)[src]
impl From<Vec3<f32>> for (f32, f32, f32)impl From<Vec3<f64>> for (f64, f64, f64)[src]
impl From<Vec3<f64>> for (f64, f64, f64)impl<T> Default for Vec3<T> where
T: Float, [src]
impl<T> Default for Vec3<T> where
T: Float, impl<T> Neg for Vec3<T> where
T: Float, [src]
impl<T> Neg for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the - operator.
fn neg(self) -> Vec3<T>[src]
fn neg(self) -> Vec3<T>Performs the unary - operation.
impl<T> Add for Vec3<T> where
T: Float, [src]
impl<T> Add for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the + operator.
fn add(self, other: Vec3<T>) -> Vec3<T>[src]
fn add(self, other: Vec3<T>) -> Vec3<T>Performs the + operation.
impl<T> AddAssign for Vec3<T> where
T: Float, [src]
impl<T> AddAssign for Vec3<T> where
T: Float, fn add_assign(&mut self, other: Vec3<T>)[src]
fn add_assign(&mut self, other: Vec3<T>)Performs the += operation.
impl<T> Sub for Vec3<T> where
T: Float, [src]
impl<T> Sub for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the - operator.
fn sub(self, other: Vec3<T>) -> Vec3<T>[src]
fn sub(self, other: Vec3<T>) -> Vec3<T>Performs the - operation.
impl<T> SubAssign for Vec3<T> where
T: Float, [src]
impl<T> SubAssign for Vec3<T> where
T: Float, fn sub_assign(&mut self, other: Vec3<T>)[src]
fn sub_assign(&mut self, other: Vec3<T>)Performs the -= operation.
impl<T> Mul<Vec3<T>> for Vec3<T> where
T: Float, [src]
impl<T> Mul<Vec3<T>> for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the * operator.
fn mul(self, other: Vec3<T>) -> Vec3<T>[src]
fn mul(self, other: Vec3<T>) -> Vec3<T>Multiplies individual vector components with those of the given vector.
impl<T> MulAssign<Vec3<T>> for Vec3<T> where
T: Float, [src]
impl<T> MulAssign<Vec3<T>> for Vec3<T> where
T: Float, fn mul_assign(&mut self, other: Vec3<T>)[src]
fn mul_assign(&mut self, other: Vec3<T>)Mutates the vector by multiplying its components with those of the given vector.
impl<T> Mul<T> for Vec3<T> where
T: Float, [src]
impl<T> Mul<T> for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the * operator.
fn mul(self, other: T) -> Vec3<T>[src]
fn mul(self, other: T) -> Vec3<T>Multiplies the vector with given scalar operand.
impl<T> MulAssign<T> for Vec3<T> where
T: Float, [src]
impl<T> MulAssign<T> for Vec3<T> where
T: Float, fn mul_assign(&mut self, other: T)[src]
fn mul_assign(&mut self, other: T)Mutates the vector by multiplying it with the scalar operand.
impl<T> Div<Vec3<T>> for Vec3<T> where
T: Float, [src]
impl<T> Div<Vec3<T>> for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the / operator.
fn div(self, other: Vec3<T>) -> Vec3<T>[src]
fn div(self, other: Vec3<T>) -> Vec3<T>Divides individual vector components with those of the given vector.
impl<T> DivAssign<Vec3<T>> for Vec3<T> where
T: Float, [src]
impl<T> DivAssign<Vec3<T>> for Vec3<T> where
T: Float, fn div_assign(&mut self, other: Vec3<T>)[src]
fn div_assign(&mut self, other: Vec3<T>)Mutates the vector by dividing its components with those of the given vector.
impl<T> Div<T> for Vec3<T> where
T: Float, [src]
impl<T> Div<T> for Vec3<T> where
T: Float, type Output = Vec3<T>
The resulting type after applying the / operator.
fn div(self, other: T) -> Vec3<T>[src]
fn div(self, other: T) -> Vec3<T>Divides the vector by given scalar operand.
impl<T> DivAssign<T> for Vec3<T> where
T: Float, [src]
impl<T> DivAssign<T> for Vec3<T> where
T: Float, fn div_assign(&mut self, other: T)[src]
fn div_assign(&mut self, other: T)Mutates the vector by dividing it by given scalar.
impl Mul<Vec3<f32>> for f32[src]
impl Mul<Vec3<f32>> for f32type Output = Vec3<f32>
The resulting type after applying the * operator.
fn mul(self, other: Vec3<f32>) -> Vec3<f32>[src]
fn mul(self, other: Vec3<f32>) -> Vec3<f32>Performs the * operation.
impl Mul<Vec3<f64>> for f64[src]
impl Mul<Vec3<f64>> for f64type Output = Vec3<f64>
The resulting type after applying the * operator.
fn mul(self, other: Vec3<f64>) -> Vec3<f64>[src]
fn mul(self, other: Vec3<f64>) -> Vec3<f64>Performs the * operation.
impl AsUniform for Vec3<f32>[src]
impl AsUniform for Vec3<f32>fn as_uniform(&self) -> Uniform[src]
fn as_uniform(&self) -> Uniformimpl AsUniform for Vec3<f64>[src]
impl AsUniform for Vec3<f64>fn as_uniform(&self) -> Uniform[src]
fn as_uniform(&self) -> Uniformimpl<T> Debug for Vec3<T> where
T: Debug, [src]
impl<T> Debug for Vec3<T> where
T: Debug, fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T> Mul<Vec3<T>> for Mat4<T> where
T: Float, [src]
impl<T> Mul<Vec3<T>> for Mat4<T> where
T: Float,