pub struct Mat4 {
pub cols: [[f32; 4]; 4],
}Expand description
A simple 4x4 matrix stored in column-major order.
Fields§
§cols: [[f32; 4]; 4]Implementations§
Source§impl Mat4
impl Mat4
pub const IDENTITY: Mat4
pub fn look_at(eye: Vec3, target: Vec3, up: Vec3) -> Self
pub fn orthographic( left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, ) -> Self
pub fn perspective(fov_y: f32, aspect: f32, near: f32, far: f32) -> Self
pub fn mul_mat4(self, rhs: Self) -> Self
pub fn transform_point(self, p: Vec3) -> Vec3
Trait Implementations§
impl Copy for Mat4
impl StructuralPartialEq 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