[−][src]Struct nova_math::matrix::TMat4x4
A column major 4x4 floating point matrix
Methods
impl<T: Real> TMat4x4<T>[src]
pub fn new(input: [T; 16]) -> TMat4x4<T>[src]
Construct a new 4x4 matrix from a flat array of 16 elements
pub fn zero() -> TMat4x4<T>[src]
Construct a new 4x4 matrix of entirely zeroes
pub fn identity() -> TMat4x4<T>[src]
Construct a new 4x4 identity matrix
pub fn perspective(aspect: T, fov: T, near: T, far: T) -> TMat4x4<T>[src]
Construct a new Vulkan compatible perspective transform matrix
pub fn translation(translation: TVec3<T>) -> TMat4x4<T>[src]
Construct a new translation matrix with the given translation
pub fn translate(&mut self, translation: TVec3<T>)[src]
Apply a translation to this matrix
pub fn rotation(angle: T, axis: TVec3<T>) -> TMat4x4<T>[src]
Get an angle axis rotation matrix
pub fn rotate(&mut self, angle: T, in_axis: TVec3<T>)[src]
Apply an angle axis rotation to this matrix
pub fn scaling(scale: TVec3<T>) -> TMat4x4<T>[src]
Get a scaling matrix
pub fn scale(&mut self, scale: TVec3<T>)[src]
Apply scaling to the matrix
pub fn from_columns(
col0: [T; 4],
col1: [T; 4],
col2: [T; 4],
col3: [T; 4]
) -> Self[src]
col0: [T; 4],
col1: [T; 4],
col2: [T; 4],
col3: [T; 4]
) -> Self
Construct a new matrix from the four columns passed into the function
pub fn apply(&self, vec: TVec4<T>) -> TVec4<T>[src]
Apply this matrix to a vector, creating a new one in the process
pub fn apply_to(&self, rhs: &mut TVec4<T>)[src]
Apply a matrix to the given vector
Trait Implementations
impl<T: Real> Transpose for TMat4x4<T>[src]
impl<T: Real> TransposeAssign for TMat4x4<T>[src]
fn transpose_assign(&mut self)[src]
impl<T: Real> Inverse for TMat4x4<T>[src]
impl<T: Real> InverseAssign for TMat4x4<T>[src]
fn inverse_assign(&mut self)[src]
impl<T: Real> IntoSTD140 for TMat4x4<T>[src]
type Output = TMat4x4P<T>
fn into_std140(self) -> Self::Output[src]
impl<T: Real> Column for TMat4x4<T>[src]
impl<T: Real> ColumnRef for TMat4x4<T>[src]
fn get_column_ref(&self, col: usize) -> &Self::Output[src]
impl<T: Real> ColumnRefMut for TMat4x4<T>[src]
fn get_column_ref_mut(&mut self, col: usize) -> &mut Self::Output[src]
impl<T: Real> Row for TMat4x4<T>[src]
impl<'_, T: Real> From<&'_ [T; 16]> for TMat4x4<T>[src]
impl<T: Real> From<TMat4x4<T>> for TMat4x4P<T>[src]
impl<T: Real> Display for TMat4x4<T>[src]
impl<T: Debug + Real> Debug for TMat4x4<T>[src]
impl<T: Real> Div<TMat4x4<T>> for TMat4x4<T>[src]
type Output = Self
The resulting type after applying the / operator.
fn div(self, rhs: TMat4x4<T>) -> Self::Output[src]
impl<T: Real> Sub<TMat4x4<T>> for TMat4x4<T>[src]
type Output = Self
The resulting type after applying the - operator.
fn sub(self, rhs: TMat4x4<T>) -> Self::Output[src]
impl<T: Real> PartialEq<TMat4x4<T>> for TMat4x4<T>[src]
impl<T: Real> Add<TMat4x4<T>> for TMat4x4<T>[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: TMat4x4<T>) -> Self::Output[src]
impl<T: Real> Mul<TMat4x4<T>> for TMat4x4<T>[src]
type Output = Self
The resulting type after applying the * operator.
fn mul(self, rhs: TMat4x4<T>) -> Self::Output[src]
impl<T: Real> Mul<TVec4<T>> for TMat4x4<T>[src]
type Output = TVec4<T>
The resulting type after applying the * operator.
fn mul(self, rhs: TVec4<T>) -> Self::Output[src]
impl<T: Real> Mul<T> for TMat4x4<T>[src]
type Output = TMat4x4<T>
The resulting type after applying the * operator.
fn mul(self, rhs: T) -> Self::Output[src]
impl<T: Real> AddAssign<TMat4x4<T>> for TMat4x4<T>[src]
fn add_assign(&mut self, rhs: TMat4x4<T>)[src]
impl<T: Real> SubAssign<TMat4x4<T>> for TMat4x4<T>[src]
fn sub_assign(&mut self, rhs: TMat4x4<T>)[src]
impl<T: Real> MulAssign<TMat4x4<T>> for TMat4x4<T>[src]
fn mul_assign(&mut self, rhs: TMat4x4<T>)[src]
impl<T: Real> MulAssign<T> for TMat4x4<T>[src]
fn mul_assign(&mut self, rhs: T)[src]
impl<T: Real> DivAssign<TMat4x4<T>> for TMat4x4<T>[src]
fn div_assign(&mut self, rhs: TMat4x4<T>)[src]
impl<T: Real> Index<usize> for TMat4x4<T>[src]
type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output[src]
Index the matrix linearly
impl<T: Real> Index<(usize, usize)> for TMat4x4<T>[src]
type Output = T
The returned type after indexing.
fn index(&self, index: (usize, usize)) -> &Self::Output[src]
Index the matrix. (row, column)
impl<T: Real> IndexMut<usize> for TMat4x4<T>[src]
impl<T: Real> IndexMut<(usize, usize)> for TMat4x4<T>[src]
fn index_mut(&mut self, index: (usize, usize)) -> &mut Self::Output[src]
Index the matrix. (row, column)
impl<T: Real> Into<[T; 16]> for TMat4x4<T>[src]
impl<T: Real> Into<TMat4x4<T>> for TQuat<T>[src]
impl<T: Clone + Real> Clone for TMat4x4<T>[src]
Auto Trait Implementations
impl<T> Unpin for TMat4x4<T> where
T: Unpin,
T: Unpin,
impl<T> Send for TMat4x4<T> where
T: Send,
T: Send,
impl<T> Sync for TMat4x4<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for TMat4x4<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for TMat4x4<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> 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, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,