pub struct DMat4 {
pub m: [f64; 16],
}Expand description
Double-precision 4x4 matrix stored column-major.
Fields§
§m: [f64; 16]Column-major elements: m[col * 4 + row].
Implementations§
Source§impl DMat4
impl DMat4
pub const IDENTITY: Self
pub fn multiply(&self, rhs: &Self) -> Self
Sourcepub fn transform_point4(&self, p: DVec3) -> [f64; 4]
pub fn transform_point4(&self, p: DVec3) -> [f64; 4]
Transforms a point and returns clip space [x, y, z, w].
Sourcepub fn look_at(eye: DVec3, target: DVec3, up: DVec3) -> Self
pub fn look_at(eye: DVec3, target: DVec3, up: DVec3) -> Self
Right-handed look-at, matching math3d::Mat4::look_at exactly.
Sourcepub fn view_rotation_only(eye: DVec3, target: DVec3, up: DVec3) -> Self
pub fn view_rotation_only(eye: DVec3, target: DVec3, up: DVec3) -> Self
Right-handed look-at without translation, suitable for Relative-To-Eye (RTE) rendering.
Sourcepub fn perspective(fov_y_rad: f64, aspect: f64, near: f64, far: f64) -> Self
pub fn perspective(fov_y_rad: f64, aspect: f64, near: f64, far: f64) -> Self
Perspective projection with depth in 0..=1, column-major.
math3d::Mat4 multiplies with M * v where the third and fourth rows
are swapped relative to the usual convention. The f32 3D path therefore
uses this layout, and the f64 path mirrors it so a point projects to the
same pixel through either matrix.
Trait Implementations§
impl Copy for DMat4
impl StructuralPartialEq for DMat4
Auto Trait Implementations§
impl Forget for DMat4
impl Freeze for DMat4
impl Move for DMat4
impl RefUnwindSafe for DMat4
impl Send for DMat4
impl Sync for DMat4
impl Unpin for DMat4
impl UnsafeUnpin for DMat4
impl UnwindSafe for DMat4
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