pub struct Mat4 {
pub cols: [[f32; 4]; 4],
}Expand description
Common 4x4 matrix type used in the deferred pipeline (column-major).
Fields§
§cols: [[f32; 4]; 4]Implementations§
Source§impl Mat4
impl Mat4
pub const IDENTITY: Self
pub fn from_cols(c0: [f32; 4], c1: [f32; 4], c2: [f32; 4], c3: [f32; 4]) -> Self
pub fn mul_mat4(&self, rhs: &Mat4) -> Mat4
pub fn mul_vec4(&self, v: [f32; 4]) -> [f32; 4]
pub fn transpose(&self) -> Mat4
pub fn perspective(fov_y_rad: f32, aspect: f32, near: f32, far: f32) -> Self
pub fn look_at(eye: [f32; 3], center: [f32; 3], up: [f32; 3]) -> Self
Trait Implementations§
impl Copy for Mat4
Auto Trait Implementations§
impl Freeze for Mat4
impl RefUnwindSafe for Mat4
impl Send for Mat4
impl Sync for Mat4
impl Unpin for Mat4
impl UnsafeUnpin for Mat4
impl UnwindSafe for Mat4
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