Expand description
4x4 matrix; very common in graphics programming.
Fields
v: [f32; 16]
Implementations
impl Mat4
impl Mat4
pub fn translation(x: f32, y: f32, z: f32) -> Mat4
pub fn ortho(
left: f32,
right: f32,
top: f32,
bottom: f32,
near: f32,
far: f32,
scalex: f32,
scaley: f32
) -> Mat4
pub fn transform_vec4(&self, v: Vec4) -> Vec4
pub fn as_rotation(&self) -> Mat4
pub fn as_rotation(&self) -> Mat4
Extracts just the rotation values from a transformation matrix.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Mat4
impl UnwindSafe for Mat4
Blanket Implementations
Mutably borrows from an owned value. Read more