#[non_exhaustive]pub struct Mat4 {
pub m: [[f64; 4]; 4],
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.m: [[f64; 4]; 4]Row-major: m[row][col]
Implementations§
Source§impl Mat4
impl Mat4
pub const IDENTITY: Self
pub const ZERO: Self
pub const fn new(m: [[f64; 4]; 4]) -> Self
Sourcepub fn transform_point(&self, v: Vec3) -> Vec3
pub fn transform_point(&self, v: Vec3) -> Vec3
Transform a 3D point (w=1, perspective divide on output)
Sourcepub fn transform_dir(&self, v: Vec3) -> Vec3
pub fn transform_dir(&self, v: Vec3) -> Vec3
Transform a direction (w=0, no translation)
pub fn transpose(&self) -> Self
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