#[repr(C)]pub struct Matrix4<T: Float> {
pub x: Vector4<T>,
pub y: Vector4<T>,
pub z: Vector4<T>,
pub w: Vector4<T>,
}
Fields§
§x: Vector4<T>
§y: Vector4<T>
§z: Vector4<T>
§w: Vector4<T>
Implementations§
Source§impl<T: Float> Matrix4<T>
impl<T: Float> Matrix4<T>
pub fn identity() -> Matrix4<T>
pub fn transpose(m: &Matrix4<T>) -> Matrix4<T>
pub fn determinant(m: &Matrix4<T>) -> T
pub fn inverse(m: &Matrix4<T>) -> Option<Matrix4<T>>
pub fn translate(v: &Vector3<T>) -> Matrix4<T>
pub fn rotate(rad: T, v: &Vector3<T>) -> Matrix4<T>
pub fn scale(v: &Vector3<T>) -> Matrix4<T>
pub fn ortho( left: T, right: T, bottom: T, top: T, near: T, far: T, ) -> Matrix4<T>
pub fn perspective(fovy: T, aspect: T, near: T, far: T) -> Matrix4<T>
Trait Implementations§
Source§impl<T: Float> AddAssign for Matrix4<T>
impl<T: Float> AddAssign for Matrix4<T>
Source§fn add_assign(&mut self, rhs: Matrix4<T>)
fn add_assign(&mut self, rhs: Matrix4<T>)
Performs the
+=
operation. Read moreSource§impl<T: Float> MulAssign<T> for Matrix4<T>
impl<T: Float> MulAssign<T> for Matrix4<T>
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moreSource§impl<T: Float> MulAssign for Matrix4<T>
impl<T: Float> MulAssign for Matrix4<T>
Source§fn mul_assign(&mut self, rhs: Matrix4<T>)
fn mul_assign(&mut self, rhs: Matrix4<T>)
Performs the
*=
operation. Read moreSource§impl<T: Float> SubAssign for Matrix4<T>
impl<T: Float> SubAssign for Matrix4<T>
Source§fn sub_assign(&mut self, rhs: Matrix4<T>)
fn sub_assign(&mut self, rhs: Matrix4<T>)
Performs the
-=
operation. Read moreimpl<T: Copy + Float> Copy for Matrix4<T>
impl<T: Float> StructuralPartialEq for Matrix4<T>
Auto Trait Implementations§
impl<T> Freeze for Matrix4<T>where
T: Freeze,
impl<T> RefUnwindSafe for Matrix4<T>where
T: RefUnwindSafe,
impl<T> Send for Matrix4<T>where
T: Send,
impl<T> Sync for Matrix4<T>where
T: Sync,
impl<T> Unpin for Matrix4<T>where
T: Unpin,
impl<T> UnwindSafe for Matrix4<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