#[repr(C, align(16))]pub struct TMat4x4<T: Real> { /* private fields */ }
Expand description
A column major 4x4 floating point matrix
Implementations§
Source§impl<T: Real> TMat4x4<T>
impl<T: Real> TMat4x4<T>
Sourcepub fn new(input: [T; 16]) -> TMat4x4<T>
pub fn new(input: [T; 16]) -> TMat4x4<T>
Construct a new 4x4 matrix from a flat array of 16 elements
Sourcepub fn perspective(aspect: T, fov: T, near: T, far: T) -> TMat4x4<T>
pub fn perspective(aspect: T, fov: T, near: T, far: T) -> TMat4x4<T>
Construct a new Vulkan compatible perspective transform matrix
Sourcepub fn translation(translation: TVec3<T>) -> TMat4x4<T>
pub fn translation(translation: TVec3<T>) -> TMat4x4<T>
Construct a new translation matrix with the given translation
Sourcepub fn rotate(&mut self, angle: T, in_axis: TVec3<T>)
pub fn rotate(&mut self, angle: T, in_axis: TVec3<T>)
Apply an angle axis rotation to this matrix
Sourcepub fn from_columns(
col0: [T; 4],
col1: [T; 4],
col2: [T; 4],
col3: [T; 4],
) -> Self
pub fn from_columns( 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
Trait Implementations§
Source§impl<T: Real> AddAssign for TMat4x4<T>
impl<T: Real> AddAssign for TMat4x4<T>
Source§fn add_assign(&mut self, rhs: TMat4x4<T>)
fn add_assign(&mut self, rhs: TMat4x4<T>)
Performs the
+=
operation. Read moreSource§impl<T: Real> ColumnRef for TMat4x4<T>
impl<T: Real> ColumnRef for TMat4x4<T>
Source§fn get_column_ref(&self, col: usize) -> &Self::Output
fn get_column_ref(&self, col: usize) -> &Self::Output
Get a reference to a given column of a matrix
Source§impl<T: Real> ColumnRefMut for TMat4x4<T>
impl<T: Real> ColumnRefMut for TMat4x4<T>
Source§fn get_column_ref_mut(&mut self, col: usize) -> &mut Self::Output
fn get_column_ref_mut(&mut self, col: usize) -> &mut Self::Output
Get a mutable reference to a given column of a matrix
Source§impl<T: Real> DivAssign for TMat4x4<T>
impl<T: Real> DivAssign for TMat4x4<T>
Source§fn div_assign(&mut self, rhs: TMat4x4<T>)
fn div_assign(&mut self, rhs: TMat4x4<T>)
Performs the
/=
operation. Read moreSource§impl<T: Real> IntoSTD140 for TMat4x4<T>
impl<T: Real> IntoSTD140 for TMat4x4<T>
Source§impl<T: Real> InverseAssign for TMat4x4<T>
impl<T: Real> InverseAssign for TMat4x4<T>
fn inverse_assign(&mut self)
Source§impl<T: Real> MulAssign<T> for TMat4x4<T>
impl<T: Real> MulAssign<T> for TMat4x4<T>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moreSource§impl<T: Real> MulAssign for TMat4x4<T>
impl<T: Real> MulAssign for TMat4x4<T>
Source§fn mul_assign(&mut self, rhs: TMat4x4<T>)
fn mul_assign(&mut self, rhs: TMat4x4<T>)
Performs the
*=
operation. Read moreSource§impl<T: Real> SubAssign for TMat4x4<T>
impl<T: Real> SubAssign for TMat4x4<T>
Source§fn sub_assign(&mut self, rhs: TMat4x4<T>)
fn sub_assign(&mut self, rhs: TMat4x4<T>)
Performs the
-=
operation. Read moreSource§impl<T: Real> TransposeAssign for TMat4x4<T>
impl<T: Real> TransposeAssign for TMat4x4<T>
fn transpose_assign(&mut self)
Auto Trait Implementations§
impl<T> Freeze for TMat4x4<T>where
T: Freeze,
impl<T> RefUnwindSafe for TMat4x4<T>where
T: RefUnwindSafe,
impl<T> Send for TMat4x4<T>where
T: Send,
impl<T> Sync for TMat4x4<T>where
T: Sync,
impl<T> Unpin for TMat4x4<T>where
T: Unpin,
impl<T> UnwindSafe for TMat4x4<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more